This is an archive of the discontinued LLVM Phabricator instance.

[tsan] Use re-exec method to enable interceptors on older versions of OS X
ClosedPublic

Authored by kubamracek on Dec 1 2015, 11:46 AM.

Details

Summary

In AddressSanitizer, we have the MaybeReexec method to detect when we're running without DYLD_INSERT_LIBRARIES (in which case interceptors don't work) and re-execute with the environment variable set. On OS X 10.11+, this is no longer necessary, but to have ThreadSanitizer supported on older versions of OS X, let's use the same method as well. This patch moves the implementation from asan/ into sanitizer_common/.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek updated this revision to Diff 41546.Dec 1 2015, 11:46 AM
kubamracek retitled this revision from to [tsan] Use re-exec method to enable interceptors on older versions of OS X.
kubamracek updated this object.
kubamracek added reviewers: dvyukov, samsonov, glider, kcc.
dvyukov accepted this revision.Dec 2 2015, 9:04 AM
dvyukov edited edge metadata.
This revision is now accepted and ready to land.Dec 2 2015, 9:04 AM
This revision was automatically updated to reflect the committed changes.