Skip to content

Commit 0c67478

Browse files
committed
Merge r368219 (PR42988)
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: 369341
1 parent f3feb0f commit 0c67478

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/asan/asan_posix.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ void AsanOnDeadlySignal(int signo, void *siginfo, void *context) {
3939

4040
// ---------------------- TSD ---------------- {{{1
4141

42-
#if SANITIZER_NETBSD
43-
// Thread Static Data cannot be used in early init on NetBSD.
42+
#if SANITIZER_NETBSD && !ASAN_DYNAMIC
43+
// Thread Static Data cannot be used in early static ASan init on NetBSD.
4444
// Reuse the Asan TSD API for compatibility with existing code
4545
// with an alternative implementation.
4646

0 commit comments

Comments
 (0)