summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_win.cc
diff options
context:
space:
mode:
authorKuba Brecka <kuba.brecka@gmail.com>2016-03-17 08:37:25 +0000
committerKuba Brecka <kuba.brecka@gmail.com>2016-03-17 08:37:25 +0000
commitcaee8854ce815fd9c7f02d29603a6680f324ceed (patch)
tree1c2216b9ea2f19a3334c3e70d87049ded81d9391 /lib/sanitizer_common/sanitizer_win.cc
parentcf3edeb92e31d2c4bcc7575c1eb2c7abd8c5b15a (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@263695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_win.cc')
-rw-r--r--lib/sanitizer_common/sanitizer_win.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/sanitizer_common/sanitizer_win.cc b/lib/sanitizer_common/sanitizer_win.cc
index b0424aad4..f77e1c19c 100644
--- a/lib/sanitizer_common/sanitizer_win.cc
+++ b/lib/sanitizer_common/sanitizer_win.cc
@@ -842,10 +842,6 @@ void CheckVMASize() {
// Do nothing.
}
-void DisableReexec() {
- // No need to re-exec on Windows.
-}
-
void MaybeReexec() {
// No need to re-exec on Windows.
}