diff options
author | Kamil Rytarowski <n54@gmx.com> | 2019-08-07 21:56:43 +0000 |
---|---|---|
committer | Kamil Rytarowski <n54@gmx.com> | 2019-08-07 21:56:43 +0000 |
commit | 72c940417aa56bbdc08d6f731b22dfa85d32b630 (patch) | |
tree | 0bbdc66f3df4a40eb7d84307ccc1d4724ab8173a /compiler-rt/lib/asan | |
parent | c96387fce36bf8807fec1edc9eca18c78f99f455 (diff) | |
download | bcm5719-llvm-72c940417aa56bbdc08d6f731b22dfa85d32b630.tar.gz bcm5719-llvm-72c940417aa56bbdc08d6f731b22dfa85d32b630.zip |
Restrict the NetBSD ASan TSD fallback to !ASAN_DYNAMIC
The fallback to the alternative implementation of TSD with TLS
is only needed for the static version of ASan for NetBSD.
The same code cannot be reused for the dynamic version of ASan as
TLS breaks and TSD code works.
llvm-svn: 368219
Diffstat (limited to 'compiler-rt/lib/asan')
-rw-r--r-- | compiler-rt/lib/asan/asan_posix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_posix.cpp b/compiler-rt/lib/asan/asan_posix.cpp index fab8905b317..920d216624a 100644 --- a/compiler-rt/lib/asan/asan_posix.cpp +++ b/compiler-rt/lib/asan/asan_posix.cpp @@ -39,8 +39,8 @@ void AsanOnDeadlySignal(int signo, void *siginfo, void *context) { // ---------------------- TSD ---------------- {{{1 -#if SANITIZER_NETBSD -// Thread Static Data cannot be used in early init on NetBSD. +#if SANITIZER_NETBSD && !ASAN_DYNAMIC +// Thread Static Data cannot be used in early static ASan init on NetBSD. // Reuse the Asan TSD API for compatibility with existing code // with an alternative implementation. |