[compiler-rt] 042f01b - Revert "[LSAN] Enable more tests which are passing as is in HWASAN."
Kirill Stoimenov via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 2 09:12:44 PST 2023
Author: Kirill Stoimenov
Date: 2023-02-02T17:12:31Z
New Revision: 042f01b28928c7acb3ce44e4e6281bf229bebb1c
URL: https://github.com/llvm/llvm-project/commit/042f01b28928c7acb3ce44e4e6281bf229bebb1c
DIFF: https://github.com/llvm/llvm-project/commit/042f01b28928c7acb3ce44e4e6281bf229bebb1c.diff
LOG: Revert "[LSAN] Enable more tests which are passing as is in HWASAN."
This reverts commit b4abbf17572dce3993402f2e00e72678518ef6e1.
Added:
Modified:
compiler-rt/test/lsan/TestCases/Linux/log-path_test.cpp
compiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp
compiler-rt/test/lsan/TestCases/disabler.c
compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp
compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp
compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp
compiler-rt/test/lsan/TestCases/link_turned_off.cpp
compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
compiler-rt/test/lsan/TestCases/suppressions_default.cpp
compiler-rt/test/lsan/TestCases/suppressions_file.cpp
compiler-rt/test/lsan/TestCases/swapcontext.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/lsan/TestCases/Linux/log-path_test.cpp b/compiler-rt/test/lsan/TestCases/Linux/log-path_test.cpp
index 2f824a195d17..55f33843d465 100644
--- a/compiler-rt/test/lsan/TestCases/Linux/log-path_test.cpp
+++ b/compiler-rt/test/lsan/TestCases/Linux/log-path_test.cpp
@@ -1,4 +1,7 @@
// RUN: %clangxx_lsan %s -o %t
+
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
// The globs below do not work in the lit shell.
// Regular run.
@@ -27,4 +30,4 @@ int main() {
// CHECK-ERROR: LeakSanitizer: detected memory leaks
// CHECK-ERROR: Direct leak of 1337 byte(s) in 1 object(s) allocated from
-// CHECK-ERROR: SUMMARY: {{.*}}Sanitizer:
+// CHECK-ERROR: SUMMARY: {{(Leak|Address)}}Sanitizer:
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 812fc3302259..e088893d6c94 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
@@ -4,6 +4,9 @@
// RUN: %env_lsan_opts="report_objects=1:use_stacks=0:use_registers=0:use_tls=1" %run %t 2>&1
// RUN: %env_lsan_opts="" %run %t 2>&1
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
+
// Investigate why it does not fail with use_tls=0
// UNSUPPORTED: arm-linux || armhf-linux
diff --git a/compiler-rt/test/lsan/TestCases/disabler.c b/compiler-rt/test/lsan/TestCases/disabler.c
index 3d785f4fca58..fb57ef5c249a 100644
--- a/compiler-rt/test/lsan/TestCases/disabler.c
+++ b/compiler-rt/test/lsan/TestCases/disabler.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=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_tls=0
// UNSUPPORTED: arm-linux || armhf-linux
@@ -23,4 +26,4 @@ int main() {
fprintf(stderr, "Test alloc: %p.\n", q);
return 0;
}
-// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
diff --git a/compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp b/compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp
index dcb293b77ba3..ba41aaa75eec 100644
--- a/compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp
+++ b/compiler-rt/test/lsan/TestCases/do_leak_check_override.cpp
@@ -1,5 +1,8 @@
// Test for __lsan_do_leak_check(). We test it by making the leak check run
// before global destructors, which also tests compatibility with HeapChecker's
+
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
// "normal" mode (LSan runs in "strict" mode by default).
// RUN: %clangxx_lsan %s -o %t
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-strict %s
@@ -34,5 +37,5 @@ int main(int argc, char *argv[]) {
return 0;
}
-// CHECK-strict: SUMMARY: {{.*}}Sanitizer: 2003 byte(s) leaked in 2 allocation(s)
-// CHECK-normal: SUMMARY: {{.*}}Sanitizer: 666 byte(s) leaked in 1 allocation(s)
+// CHECK-strict: SUMMARY: {{(Leak|Address)}}Sanitizer: 2003 byte(s) leaked in 2 allocation(s)
+// CHECK-normal: SUMMARY: {{(Leak|Address)}}Sanitizer: 666 byte(s) leaked in 1 allocation(s)
diff --git a/compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp b/compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp
index ae33b41ffa6b..c00fb5e1ceef 100644
--- a/compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp
+++ b/compiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp
@@ -5,6 +5,9 @@
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0:leak_check_at_exit=0 not %run %t foo 2>&1 | FileCheck %s --check-prefix=CHECK-do
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0:leak_check_at_exit=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-dont
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
+
#include <stdio.h>
#include <stdlib.h>
#include <sanitizer/lsan_interface.h>
@@ -16,5 +19,5 @@ int main(int argc, char *argv[]) {
return 0;
}
-// CHECK-do: SUMMARY: {{.*}}Sanitizer:
-// CHECK-dont-NOT: SUMMARY: {{.*}}Sanitizer:
+// CHECK-do: SUMMARY: {{(Leak|Address)}}Sanitizer:
+// CHECK-dont-NOT: SUMMARY: {{(Leak|Address)}}Sanitizer:
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 04f23878ca00..68eea93a81e5 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 <assert.h>
#include <pthread.h>
#include <stdio.h>
diff --git a/compiler-rt/test/lsan/TestCases/link_turned_off.cpp b/compiler-rt/test/lsan/TestCases/link_turned_off.cpp
index 4dcc9026e8a8..7227e0b91698 100644
--- a/compiler-rt/test/lsan/TestCases/link_turned_off.cpp
+++ b/compiler-rt/test/lsan/TestCases/link_turned_off.cpp
@@ -2,6 +2,9 @@
// RUN: %clangxx_lsan %s -o %t
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 not %run %t foo 2>&1 | FileCheck %s
+
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
//
// UNSUPPORTED: darwin
@@ -22,4 +25,4 @@ int main(int argc, char *argv[]) {
return 0;
}
-// CHECK: SUMMARY: {{(.*)}}Sanitizer: 4 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 4 byte(s) leaked in 1 allocation(s)
diff --git a/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp b/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
index 718ffb1773ae..ca0326d7e1f6 100644
--- a/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
+++ b/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
@@ -3,6 +3,9 @@
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t foo 2>&1 | FileCheck %s
// RUN: %env_lsan_opts=use_stacks=0:use_registers=0 %run %t 2>&1 | FileCheck %s
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
+//
// UNSUPPORTED: darwin
#include <assert.h>
@@ -22,12 +25,12 @@ int main(int argc, char *argv[]) {
// CHECK: Test alloc:
assert(__lsan_do_recoverable_leak_check() == 1);
-// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte
+// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte
// Test that we correctly reset chunk tags.
p = 0;
assert(__lsan_do_recoverable_leak_check() == 1);
-// CHECK: SUMMARY: {{.*}}Sanitizer: 1360 byte
+// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1360 byte
_exit(0);
}
diff --git a/compiler-rt/test/lsan/TestCases/suppressions_default.cpp b/compiler-rt/test/lsan/TestCases/suppressions_default.cpp
index 0aa10f016e80..9cc4a981f373 100644
--- a/compiler-rt/test/lsan/TestCases/suppressions_default.cpp
+++ b/compiler-rt/test/lsan/TestCases/suppressions_default.cpp
@@ -1,6 +1,9 @@
// RUN: %clangxx_lsan %s -o %t
// RUN: %env_lsan_opts=use_registers=0:use_stacks=0 not %run %t 2>&1 | FileCheck %s
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
+
#include <stdio.h>
#include <stdlib.h>
@@ -24,4 +27,4 @@ int main() {
}
// CHECK: Suppressions used:
// CHECK: 1 666 *LSanTestLeakingFunc*
-// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
diff --git a/compiler-rt/test/lsan/TestCases/suppressions_file.cpp b/compiler-rt/test/lsan/TestCases/suppressions_file.cpp
index 2b1ccd88f9b3..441bb12fc38e 100644
--- a/compiler-rt/test/lsan/TestCases/suppressions_file.cpp
+++ b/compiler-rt/test/lsan/TestCases/suppressions_file.cpp
@@ -1,5 +1,8 @@
// RUN: %clangxx_lsan %s -o %t
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
+
// RUN: rm -f %t.supp
// RUN: touch %t.supp
// RUN: %push_to_device %t.supp %device_rundir/%t.supp
@@ -36,6 +39,6 @@ int main() {
}
// CHECK: Suppressions used:
// CHECK: 1 666 *LSanTestLeakingFunc*
-// CHECK: SUMMARY: {{.*}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 1337 byte(s) leaked in 1 allocation(s)
-// NOSUPP: SUMMARY: {{.*}}Sanitizer: 2780 byte(s) leaked in 3 allocation(s).
+// NOSUPP: SUMMARY: {{(Leak|Address)}}Sanitizer: 2780 byte(s) leaked in 3 allocation(s).
diff --git a/compiler-rt/test/lsan/TestCases/swapcontext.cpp b/compiler-rt/test/lsan/TestCases/swapcontext.cpp
index 567cde74499f..f70b5de0255f 100644
--- a/compiler-rt/test/lsan/TestCases/swapcontext.cpp
+++ b/compiler-rt/test/lsan/TestCases/swapcontext.cpp
@@ -1,6 +1,9 @@
// We can't unwind stack if we're running coroutines on heap-allocated
// memory. Make sure we don't report these leaks.
+// Fixme: remove once test passes with hwasan
+// UNSUPPORTED: hwasan
+
// RUN: %clangxx_lsan %s -o %t
// RUN: %env_lsan_opts= %run %t 2>&1
// RUN: %env_lsan_opts= not %run %t foo 2>&1 | FileCheck %s
@@ -41,4 +44,4 @@ int main(int argc, char *argv[]) {
return 0;
}
-// CHECK: SUMMARY: {{.*}}Sanitizer: 2664 byte(s) leaked in 1 allocation(s)
+// CHECK: SUMMARY: {{(Leak|Address)}}Sanitizer: 2664 byte(s) leaked in 1 allocation(s)
More information about the llvm-commits
mailing list