[Lldb-commits] [lldb] r260284 - 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.
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 9 13:20:17 PST 2016
Author: gclayton
Date: Tue Feb 9 15:20:17 2016
New Revision: 260284
URL: http://llvm.org/viewvc/llvm-project?rev=260284&view=rev
Log:
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.
Modified:
lldb/trunk/tools/debugserver/source/debugserver.cpp
Modified: lldb/trunk/tools/debugserver/source/debugserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/debugserver.cpp?rev=260284&r1=260283&r2=260284&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/debugserver.cpp (original)
+++ lldb/trunk/tools/debugserver/source/debugserver.cpp Tue Feb 9 15:20:17 2016
@@ -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__)
More information about the lldb-commits
mailing list