From 0e14c044792e464b00ed1303f59a3484bbf4f830 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Tue, 9 Feb 2016 21:20:17 +0000 Subject: [PATCH] If we set the DYLD_INSERT_LIBRARIES environment variable when launching debugserver, for use with /usr/lib/libgmalloc.dylib, then make sure we don't pass this environment variable on to any child processes. llvm-svn: 260284 --- lldb/tools/debugserver/source/debugserver.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lldb/tools/debugserver/source/debugserver.cpp b/lldb/tools/debugserver/source/debugserver.cpp index 78990a6..369a0a1 100644 --- a/lldb/tools/debugserver/source/debugserver.cpp +++ b/lldb/tools/debugserver/source/debugserver.cpp @@ -885,6 +885,10 @@ static struct option g_long_options[] = int main (int argc, char *argv[]) { + // If debugserver is launched with DYLD_INSERT_LIBRARIES, unset it so we + // don't spawn child processes with this enabled. + unsetenv("DYLD_INSERT_LIBRARIES"); + const char *argv_sub_zero = argv[0]; // save a copy of argv[0] for error reporting post-launch #if defined (__APPLE__) -- 2.7.4