summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2018-02-27 18:05:49 +0000
committerKamil Rytarowski <n54@gmx.com>2018-02-27 18:05:49 +0000
commitad4632e07a3a07be8c046b02a64fbc4ea6b81ab9 (patch)
tree411a5b9d463a86f9951e6cef58a89e79d5d99916
parentabf75940990d19634f837022dfe931b9b42fce23 (diff)
downloadbcm5719-llvm-ad4632e07a3a07be8c046b02a64fbc4ea6b81ab9.tar.gz
bcm5719-llvm-ad4632e07a3a07be8c046b02a64fbc4ea6b81ab9.zip
Disable ASan exceptions on NetBSD
This is a workarond for the fallout from D42644: [asan] Intercept std::rethrow_exception indirectly. Reported problem on NetBSD/amd64: $ sh ./projects/compiler-rt/test/sanitizer_common/asan-i386-NetBSD/NetBSD/Output/ttyent.cc.script /usr/lib/i386/libgcc.a(unwind-dw2.o): In function `_Unwind_RaiseException': unwind-dw2.c:(.text+0x1b41): multiple definition of `_Unwind_RaiseException' /public/llvm-build/lib/clang/7.0.0/lib/netbsd/libclang_rt.asan-i386.a(asan_interceptors.cc.o):/public/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc:337: first defined here clang-7.0: error: linker command failed with exit code 1 (use -v to see invocation) llvm-svn: 326216
-rw-r--r--compiler-rt/lib/asan/asan_interceptors.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_interceptors.h b/compiler-rt/lib/asan/asan_interceptors.h
index 51a58b91d69..8a467a2193e 100644
--- a/compiler-rt/lib/asan/asan_interceptors.h
+++ b/compiler-rt/lib/asan/asan_interceptors.h
@@ -80,7 +80,8 @@ void InitializePlatformInterceptors();
# define ASAN_INTERCEPT___LONGJMP_CHK 0
#endif
-#if ASAN_HAS_EXCEPTIONS && !SANITIZER_WINDOWS && !SANITIZER_SOLARIS
+#if ASAN_HAS_EXCEPTIONS && !SANITIZER_WINDOWS && !SANITIZER_SOLARIS && \
+ !SANITIZER_NETBSD
# define ASAN_INTERCEPT___CXA_THROW 1
# define ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION 1
# if defined(_GLIBCXX_SJLJ_EXCEPTIONS) || (SANITIZER_IOS && defined(__arm__))
OpenPOWER on IntegriCloud