[compiler-rt] 23d1b65 - [test][sanitizer] Prepare test for Internal Symbolizer
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 14:00:16 PDT 2023
Author: Vitaly Buka
Date: 2023-08-15T13:42:01-07:00
New Revision: 23d1b6577a50d308938b79b1dafc198ea5094766
URL: https://github.com/llvm/llvm-project/commit/23d1b6577a50d308938b79b1dafc198ea5094766
DIFF: https://github.com/llvm/llvm-project/commit/23d1b6577a50d308938b79b1dafc198ea5094766.diff
LOG: [test][sanitizer] Prepare test for Internal Symbolizer
Reviewed By: kstoimenov
Differential Revision: https://reviews.llvm.org/D157946
Added:
Modified:
compiler-rt/test/CMakeLists.txt
compiler-rt/test/lit.common.cfg.py
compiler-rt/test/lit.common.configured.in
compiler-rt/test/lsan/TestCases/realloc_too_big.c
compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
compiler-rt/test/lsan/TestCases/suppressions_file.cpp
compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp
compiler-rt/test/sanitizer_common/TestCases/max_allocation_size.cpp
compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt
index bc37c85a140adc..ee0685ec8ee6b9 100644
--- a/compiler-rt/test/CMakeLists.txt
+++ b/compiler-rt/test/CMakeLists.txt
@@ -15,6 +15,8 @@ pythonize_bool(LLVM_ENABLE_EXPENSIVE_CHECKS)
pythonize_bool(ZLIB_FOUND)
+pythonize_bool(COMPILER_RT_ENABLE_INTERNAL_SYMBOLIZER)
+
configure_compiler_rt_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.common.configured.in
${CMAKE_CURRENT_BINARY_DIR}/lit.common.configured)
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 3b42da17b0affb..956a7702544002 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -268,6 +268,9 @@ def push_dynamic_library_lookup_path(config, new_path):
if config.have_zlib:
config.available_features.add("zlib")
+if config.have_internal_symbolizer:
+ config.available_features.add("internal_symbolizer")
+
# Use ugly construction to explicitly prohibit "clang", "clang++" etc.
# in RUN lines.
config.substitutions.append(
diff --git a/compiler-rt/test/lit.common.configured.in b/compiler-rt/test/lit.common.configured.in
index 6d1328331bc478..cc24e25ae75633 100644
--- a/compiler-rt/test/lit.common.configured.in
+++ b/compiler-rt/test/lit.common.configured.in
@@ -65,6 +65,7 @@ elif config.android:
else:
set_default("target_suffix", "-%s" % config.target_arch)
+set_default("have_internal_symbolizer", @COMPILER_RT_ENABLE_INTERNAL_SYMBOLIZER_PYBOOL@)
set_default("have_zlib", @ZLIB_FOUND_PYBOOL@)
set_default("libcxx_used", "@LLVM_LIBCXX_USED@")
diff --git a/compiler-rt/test/lsan/TestCases/realloc_too_big.c b/compiler-rt/test/lsan/TestCases/realloc_too_big.c
index 1a6569b083dcd1..c39292e36dfccc 100644
--- a/compiler-rt/test/lsan/TestCases/realloc_too_big.c
+++ b/compiler-rt/test/lsan/TestCases/realloc_too_big.c
@@ -1,5 +1,5 @@
// RUN: %clang_lsan %s -o %t
-// RUN: %env_lsan_opts=allocator_may_return_null=1:max_allocation_size_mb=1:use_stacks=0 not %run %t 2>&1 | FileCheck %s
+// RUN: %env_lsan_opts=allocator_may_return_null=1:max_allocation_size_mb=16:use_stacks=0 not %run %t 2>&1 | FileCheck %s
/// Fails when only leak sanitizer is enabled
// UNSUPPORTED: arm-linux, armhf-linux
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
-// CHECK: {{.*}}Sanitizer failed to allocate 0x100001 bytes
+// CHECK: {{.*}}Sanitizer failed to allocate 0x1000001 bytes
// CHECK: {{.*}}Sanitizer: detected memory leaks
// CHECK: {{.*}}Sanitizer: 9 byte(s) leaked in 1 allocation(s).
@@ -16,6 +16,6 @@
int main() {
char *p = malloc(9);
fprintf(stderr, "nine: %p\n", p);
- assert(realloc(p, 0x100001) == NULL); // 1MiB+1
+ assert(realloc(p, 0x1000001) == NULL); // 16MiB+1
p = 0;
}
diff --git a/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp b/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
index 718ffb1773ae07..296f5a0a5915fb 100644
--- a/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
+++ b/compiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
@@ -5,6 +5,9 @@
// UNSUPPORTED: darwin
+// FIXME: Investigate.
+// XFAIL: internal_symbolizer && lsan-standalone && i386-linux
+
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/lsan/TestCases/suppressions_file.cpp b/compiler-rt/test/lsan/TestCases/suppressions_file.cpp
index 2b1ccd88f9b30f..31cb9174888f34 100644
--- a/compiler-rt/test/lsan/TestCases/suppressions_file.cpp
+++ b/compiler-rt/test/lsan/TestCases/suppressions_file.cpp
@@ -13,6 +13,9 @@
// RUN: %push_to_device %t.supp %device_rundir/%t.supp
// RUN: %env_lsan_opts="use_registers=0:use_stacks=0:suppressions='%device_rundir/%t.supp':symbolize=false" %run %t
+// FIXME: Investigate.
+// XFAIL: internal_symbolizer && lsan-standalone && i386-linux
+
#include <stdio.h>
#include <stdlib.h>
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp
index 6edfe762a05b7e..342edb036221af 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/soft_rss_limit_mb_test.cpp
@@ -19,6 +19,9 @@
// https://github.com/google/sanitizers/issues/981
// UNSUPPORTED: android-26
+// Symbolizer needs to allocated memory when reporting.
+// UNSUPPORTED: internal_symbolizer
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/compiler-rt/test/sanitizer_common/TestCases/max_allocation_size.cpp b/compiler-rt/test/sanitizer_common/TestCases/max_allocation_size.cpp
index 44f2935434e89c..ace28965f3c1ba 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/max_allocation_size.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/max_allocation_size.cpp
@@ -43,6 +43,9 @@
// win32 is disabled due to failing errno tests.
// UNSUPPORTED: ubsan, target={{.*windows-msvc.*}}
+// Symbolizer needs to allocated memory when reporting.
+// UNSUPPORTED: internal_symbolizer
+
#include <assert.h>
#include <errno.h>
#include <limits>
diff --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
index 9d44f0230e9245..7b6847a9ad6bec 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
@@ -1,6 +1,9 @@
// RUN: %clangxx -frtti -fsanitize=null,vptr -fno-sanitize-recover=vptr -g %s -O3 -o %t
// RUN: not %run %t 2>&1 | FileCheck %s
+// FIXME: Investigate.
+// XFAIL: internal_symbolizer && (ubsan-tsan || ubsan-msan)
+
// REQUIRES: shared_cxxabi
// REQUIRES: cxxabi
// UNSUPPORTED: target={{.*windows-msvc.*}}
diff --git a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
index 2d0e48cd84f3cf..3c3af9a3a340cf 100644
--- a/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
+++ b/compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
@@ -36,6 +36,9 @@
// RUN: echo "vptr_check:S" > %t.loc-supp
// RUN: %env_ubsan_opts=halt_on_error=1:suppressions='"%t.loc-supp"' not %run %t x- 2>&1 | FileCheck %s --check-prefix=CHECK-LOC-SUPPRESS
+// FIXME: Investigate.
+// XFAIL: internal_symbolizer && (ubsan-tsan || ubsan-msan)
+
// REQUIRES: stable-runtime, cxxabi
// UNSUPPORTED: target={{.*windows-msvc.*}}
// Suppressions file not pushed to the device.
More information about the llvm-commits
mailing list