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
This commit is contained in:
Greg Clayton 2016-02-09 21:20:17 +00:00
parent f7cd8ea71f
commit 0e14c04479
1 changed files with 4 additions and 0 deletions

View File

@ -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__)