summaryrefslogtreecommitdiff
path: root/lib/xray/xray_init.cc
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-11-29 21:42:48 +0000
committerKuba Mracek <mracek@apple.com>2017-11-29 21:42:48 +0000
commit82ff537a07bdee654821abb4a2b7212de54301f4 (patch)
tree691a408e3af97a0f6ae20e560b8097c9e339d57a /lib/xray/xray_init.cc
parentd5df99b6ebd467163425ed288969f82f85068564 (diff)
[sanitizer] Add 'strip_env' flag to enable/disable removing sanitizer dylib from DYLD_INSERT_LIBRARIES
On macOS, we usually don't require launching the target with DYLD_INSERT_LIBRARIES anymore. However, it is still necessary when running a target that is not instrumented (and e.g. dlopen's an instrument library later). In any case, ASan and TSan currently remove themselves from the DYLD_INSERT_LIBRARIES environment variable to avoid passing it onto children. This works well e.g. when instrumenting a shell. A problem arises when the target is a non-instrumented shim (e.g. "xcrun") that either re-execs or launches a child that is supposed to get DYLD_INSERT_LIBRARIES propagated. To support this mode, this patch introduces 'strip_env' flag that can be used to keep DYLD_INSERT_LIBRARIES untouched. Differential Revision: https://reviews.llvm.org/D39991 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/xray/xray_init.cc')
0 files changed, 0 insertions, 0 deletions