[compiler-rt] 49b081c - [LSAN] Enable some tests which are passing as is in HWASAN.

Kirill Stoimenov via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 15:21:54 PST 2023


Author: Kirill Stoimenov
Date: 2023-02-01T23:21:30Z
New Revision: 49b081c827ee44b8dfaf13333a551b70c128108e

URL: https://github.com/llvm/llvm-project/commit/49b081c827ee44b8dfaf13333a551b70c128108e
DIFF: https://github.com/llvm/llvm-project/commit/49b081c827ee44b8dfaf13333a551b70c128108e.diff

LOG: [LSAN] Enable some tests which are passing as is in HWASAN.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D143114

Added: 
    

Modified: 
    compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c
    compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp
    compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp
    compiler-rt/test/lsan/TestCases/ignore_object.c
    compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp
    compiler-rt/test/lsan/TestCases/register_root_region.cpp
    compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c b/compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c
index 7204aa98c7deb..29f6a483a7a1d 100644
--- a/compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c
+++ b/compiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c
@@ -1,8 +1,5 @@
 // Regression test for thread lifetime tracking. Thread data should be
 // considered live during the thread's termination, at least until the
-
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
 // user-installed TSD destructors have finished running (since they may contain
 // additional cleanup tasks). LSan doesn't actually meet that goal 100%, but it
 // makes its best effort.
@@ -10,6 +7,9 @@
 // RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0:use_tls=1" %run %t
 // RUN: %env_lsan_opts="report_objects=1:use_registers=0:use_stacks=0:use_tls=0" not %run %t 2>&1 | FileCheck %s
 
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
+
 // Investigate why it does not fail with use_stack=0
 // UNSUPPORTED: arm-linux || armhf-linux
 

diff  --git a/compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp b/compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp
index d9e2925cce85c..f50a59d767c1b 100644
--- a/compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp
+++ b/compiler-rt/test/lsan/TestCases/Linux/use_tls_dynamic.cpp
@@ -50,7 +50,7 @@ int main(int argc, char *argv[]) {
 // CHECK: Test alloc: [[ADDR:0x[0-9,a-f]+]]
 // CHECK: LeakSanitizer: detected memory leaks
 // CHECK: [[ADDR]] (1337 bytes)
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer:
+// CHECK: SUMMARY: {{.*}}Sanitizer:
 
 #else  // BUILD_DSO
 // A loadable module with a large thread local section, which would require

diff  --git a/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp b/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp
index da4edfdb79bb0..e088893d6c944 100644
--- a/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp
+++ b/compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp
@@ -40,4 +40,4 @@ int main() {
 // CHECK: Test alloc: [[ADDR:0x[0-9,a-f]+]]
 // CHECK: LeakSanitizer: detected memory leaks
 // CHECK: [[ADDR]] (1337 bytes)
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer:
+// CHECK: SUMMARY: {{.*}}Sanitizer:

diff  --git a/compiler-rt/test/lsan/TestCases/ignore_object.c b/compiler-rt/test/lsan/TestCases/ignore_object.c
index 4a78c56514944..25061f82ab5ad 100644
--- a/compiler-rt/test/lsan/TestCases/ignore_object.c
+++ b/compiler-rt/test/lsan/TestCases/ignore_object.c
@@ -2,9 +2,6 @@
 // RUN: %clang_lsan %s -o %t
 // RUN: %env_lsan_opts=report_objects=1:use_registers=0:use_stacks=0:use_tls=0 not %run %t 2>&1 | FileCheck %s
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
 // Investigate why it does not fail with use_stack=0
 // UNSUPPORTED: arm-linux || armhf-linux
 
@@ -25,4 +22,4 @@ int main() {
   return 0;
 }
 // CHECK: Test alloc: [[ADDR:.*]].
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)

diff  --git a/compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp b/compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp
index 53a7fa2e5330f..bd192abc6022e 100644
--- a/compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp
+++ b/compiler-rt/test/lsan/TestCases/large_allocation_leak.cpp
@@ -19,4 +19,4 @@ int main() {
 // CHECK: Test alloc: [[ADDR:0x[0-9,a-f]+]]
 // CHECK: LeakSanitizer: detected memory leaks
 // CHECK: [[ADDR]] (33554432 bytes)
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer:
+// CHECK: SUMMARY: {{.*}}Sanitizer:

diff  --git a/compiler-rt/test/lsan/TestCases/register_root_region.cpp b/compiler-rt/test/lsan/TestCases/register_root_region.cpp
index 9df46ce6fdc18..40e99d7e32ec1 100644
--- a/compiler-rt/test/lsan/TestCases/register_root_region.cpp
+++ b/compiler-rt/test/lsan/TestCases/register_root_region.cpp
@@ -4,9 +4,6 @@
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s
 // RUN: %env_lsan_opts=use_stacks=0:use_registers=0:use_root_regions=0 not %run %t 2>&1 | FileCheck %s
 
-// Fixme: remove once test passes with hwasan
-// UNSUPPORTED: hwasan
-
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -31,4 +28,4 @@ int main(int argc, char *argv[]) {
   return 0;
 }
 // CHECK: Test alloc: [[ADDR:.*]].
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)

diff  --git a/compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp b/compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp
index dafc9e9d5c0b7..22beb8c598255 100644
--- a/compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp
+++ b/compiler-rt/test/lsan/TestCases/stale_stack_leak.cpp
@@ -52,5 +52,5 @@ void ConfirmPointerHasSurvived() {
 // CHECK-sanity: Test alloc: [[ADDR:0x[0-9,a-f]+]]
 // CHECK: LeakSanitizer: detected memory leaks
 // CHECK: [[ADDR]] (1337 bytes)
-// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer:
+// CHECK: SUMMARY: {{.*}}Sanitizer:
 // CHECK-sanity: Value after LSan: [[ADDR]]


        


More information about the llvm-commits mailing list