diff --git a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp index 16ac85eb85894..c1ed2cd60580c 100644 --- a/compiler-rt/lib/hwasan/hwasan_interceptors.cpp +++ b/compiler-rt/lib/hwasan/hwasan_interceptors.cpp @@ -40,18 +40,11 @@ static void *HwasanThreadStartFunc(void *arg) { INTERCEPTOR(int, pthread_create, void *th, void *attr, void *(*callback)(void*), void * param) { EnsureMainThreadIDIsCorrect(); - ScopedTaggingDisabler tagging_disabler; + ScopedTaggingDisabler disabler; ThreadStartArg *A = reinterpret_cast (MmapOrDie( GetPageSizeCached(), "pthread_create")); *A = {callback, param}; - int res; - { - // ASAN uses the same approach to disable leaks from pthread_create. -# if CAN_SANITIZE_LEAKS - __lsan::ScopedInterceptorDisabler lsan_disabler; -# endif - res = REAL(pthread_create)(th, attr, &HwasanThreadStartFunc, A); - } + int res = REAL(pthread_create)(th, attr, &HwasanThreadStartFunc, A); return res; } diff --git a/compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c b/compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c index 6e3a9b349fc4e..a590cfb8b621a 100644 --- a/compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c +++ b/compiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c @@ -2,6 +2,9 @@ // RUN: %clang_lsan %s -o %t // RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0:use_tls=1:use_ld_allocations=0" %run %t +// Fixme: remove once test passes with hwasan +// UNSUPPORTED: hwasan + #include #include #include diff --git a/compiler-rt/test/lsan/TestCases/high_allocator_contention.cpp b/compiler-rt/test/lsan/TestCases/high_allocator_contention.cpp index e1ee9ce11833a..c3e4c01cbfb14 100644 --- a/compiler-rt/test/lsan/TestCases/high_allocator_contention.cpp +++ b/compiler-rt/test/lsan/TestCases/high_allocator_contention.cpp @@ -2,6 +2,9 @@ // Usage: ./a.out number_of_threads total_number_of_allocations // RUN: %clangxx_lsan %s -o %t // RUN: %env_lsan_opts=use_ld_allocations=0 %run %t 5 1000000 2>&1 + +// Fixme: remove once test passes with hwasan +// UNSUPPORTED: hwasan #include #include #include diff --git a/compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp b/compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp index 04f23878ca009..68eea93a81e57 100644 --- a/compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp +++ b/compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp @@ -3,6 +3,9 @@ // RUN: %clangxx_lsan %s -o %t // RUN: %env_lsan_opts="log_pointers=1:log_threads=1" %run %t +// Fixme: remove once test passes with hwasan +// UNSUPPORTED: hwasan + #include #include #include