llvm-project/compiler-rt/lib/tsan/tests/rtl
Kuba Brecka 4c80867ecf [sanitizer] On OS X, verify that interceptors work and abort if not, take 2
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
2016-03-17 08:37:25 +00:00
..
CMakeLists.txt [tsan] Rename tsan_test_util_linux.cc to tsan_test_util_posix.cc 2015-11-11 15:42:00 +00:00
tsan_bench.cc
tsan_mop.cc
tsan_mutex.cc
tsan_posix.cc [tsan] Replace new/delete with a local variable in ThreadSpecificDtors unit test 2015-11-19 17:50:07 +00:00
tsan_string.cc tsan: remove TSAN_SHADOW_COUNT 2015-01-19 15:01:07 +00:00
tsan_test.cc [sanitizer] On OS X, verify that interceptors work and abort if not, take 2 2016-03-17 08:37:25 +00:00
tsan_test_util.h [tsan] Fix a typo in tsan_test_util.h 2015-11-13 20:42:57 +00:00
tsan_test_util_posix.cc [tsan] Fix detached threads in unit tests on OS X 2015-11-21 12:41:36 +00:00
tsan_thread.cc