diff --git a/compiler-rt/lib/asan/asan_thread.cpp b/compiler-rt/lib/asan/asan_thread.cpp --- a/compiler-rt/lib/asan/asan_thread.cpp +++ b/compiler-rt/lib/asan/asan_thread.cpp @@ -323,9 +323,7 @@ if (tls_begin_ != tls_end_) { uptr tls_begin_aligned = RoundDownTo(tls_begin_, ASAN_SHADOW_GRANULARITY); uptr tls_end_aligned = RoundUpTo(tls_end_, ASAN_SHADOW_GRANULARITY); - FastPoisonShadowPartialRightRedzone(tls_begin_aligned, - tls_end_ - tls_begin_aligned, - tls_end_aligned - tls_end_, 0); + FastPoisonShadow(tls_begin_aligned, tls_end_aligned - tls_begin_aligned, 0); } } diff --git a/compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cpp b/compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cpp --- a/compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cpp @@ -1,6 +1,7 @@ // Test that TLS is unpoisoned on thread death. // REQUIRES: x86-target-arch && !android +// RUN: %clangxx_asan -O0 %s -pthread -o %t && %run %t 2>&1 // RUN: %clangxx_asan -O1 %s -pthread -o %t && %run %t 2>&1 #include