diff options
| author | Greg Clayton <gclayton@apple.com> | 2016-02-09 21:20:17 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2016-02-09 21:20:17 +0000 |
| commit | 0e14c044792e464b00ed1303f59a3484bbf4f830 (patch) | |
| tree | c5c1eab7299803b42663665e85727d613b2698b7 /lldb | |
| parent | f7cd8ea71fc433467e3459dd5e30b5d6234c913e (diff) | |
| download | bcm5719-llvm-0e14c044792e464b00ed1303f59a3484bbf4f830.tar.gz bcm5719-llvm-0e14c044792e464b00ed1303f59a3484bbf4f830.zip | |
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
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/tools/debugserver/source/debugserver.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/tools/debugserver/source/debugserver.cpp b/lldb/tools/debugserver/source/debugserver.cpp index 78990a671d8..369a0a1c47d 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__) |

