[compiler-rt] r368219 - Restrict the NetBSD ASan TSD fallback to !ASAN_DYNAMIC

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 14:56:43 PDT 2019


Author: kamil
Date: Wed Aug  7 14:56:43 2019
New Revision: 368219

URL: http://llvm.org/viewvc/llvm-project?rev=368219&view=rev
Log:
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.

Modified:
    compiler-rt/trunk/lib/asan/asan_posix.cpp

Modified: compiler-rt/trunk/lib/asan/asan_posix.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_posix.cpp?rev=368219&r1=368218&r2=368219&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_posix.cpp (original)
+++ compiler-rt/trunk/lib/asan/asan_posix.cpp Wed Aug  7 14:56:43 2019
@@ -39,8 +39,8 @@ void AsanOnDeadlySignal(int signo, void
 
 // ---------------------- 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.
 




More information about the llvm-commits mailing list