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
This commit is contained in:
Kamil Rytarowski 2019-08-07 21:56:43 +00:00
parent c96387fce3
commit 72c940417a
1 changed files with 2 additions and 2 deletions

View File

@ -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.