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.
Details
Details
- Reviewers
eugenis filcab fjricci kcc george.karpenkov - Commits
- rGceea5466eb02: [sanitizer] Add 'strip_env' flag to enable/disable removing sanitizer dylib…
rL319365: [sanitizer] Add 'strip_env' flag to enable/disable removing sanitizer dylib…
rCRT319365: [sanitizer] Add 'strip_env' flag to enable/disable removing sanitizer dylib…
Diff Detail
Diff Detail
- Repository
- rCRT Compiler Runtime