forked from OSchip/llvm-project
4c80867ecf
On OS X 10.11+, we have "automatic interceptors", so we don't need to use DYLD_INSERT_LIBRARIES when launching instrumented programs. However, non-instrumented programs that load TSan late (e.g. via dlopen) are currently broken, as TSan will still try to initialize, but the program will crash/hang at random places (because the interceptors don't work). This patch adds an explicit check that interceptors are working, and if not, it aborts and prints out an error message suggesting to explicitly use DYLD_INSERT_LIBRARIES. TSan unit tests run with a statically linked runtime, where interceptors don't work. To avoid aborting the process in this case, the patch replaces `DisableReexec()` with a weak `ReexecDisabled()` function which is defined to return true in unit tests. Differential Revision: http://reviews.llvm.org/D18212 llvm-svn: 263695 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
tsan_bench.cc | ||
tsan_mop.cc | ||
tsan_mutex.cc | ||
tsan_posix.cc | ||
tsan_string.cc | ||
tsan_test.cc | ||
tsan_test_util.h | ||
tsan_test_util_posix.cc | ||
tsan_thread.cc |