From 11ad9e31eb3b11d8996c31084c617245b5af1b87 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Wed, 2 Jun 2021 11:06:15 +0000 Subject: [PATCH] [compiler-rt] Mark symbolize_stack_fp test unsupported on Arm Thumb The new test `symbolize_stack_fp.cpp` added in https://reviews.llvm.org/D102046 assumes that we can fall back to the fast unwinder. This is not the case for Thumb and the test is currently failing on our v7 thumb bot: https://lab.llvm.org/buildbot/#/builders/26/builds/2096 Skip the test if we're building for a Thumb target. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D103512 --- .../sanitizer_common/TestCases/Linux/symbolize_stack_fp.cpp | 3 +++ compiler-rt/test/sanitizer_common/lit.common.cfg.py | 3 +++ compiler-rt/test/sanitizer_common/lit.site.cfg.py.in | 2 ++ 3 files changed, 8 insertions(+) diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/symbolize_stack_fp.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/symbolize_stack_fp.cpp index 0d798a9cc15f..8d9dad1c9ac9 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/symbolize_stack_fp.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/symbolize_stack_fp.cpp @@ -7,6 +7,9 @@ // On android %t is a wrapper python script so llvm-readelf will fail. // UNSUPPORTED: android +/// Fast unwinder does not work with Thumb code +// UNSUPPORTED: thumb + /// No .eh_frame && -g => .debug_frame // SEC: .debug_frame diff --git a/compiler-rt/test/sanitizer_common/lit.common.cfg.py b/compiler-rt/test/sanitizer_common/lit.common.cfg.py index b4f0670f9959..110314bbb4bd 100644 --- a/compiler-rt/test/sanitizer_common/lit.common.cfg.py +++ b/compiler-rt/test/sanitizer_common/lit.common.cfg.py @@ -31,6 +31,9 @@ config.available_features.add(config.tool_name) if config.host_os == 'Linux' and config.tool_name == "lsan" and config.target_arch == 'i386': config.available_features.add("lsan-x86") +if config.arm_thumb: + config.available_features.add('thumb') + if config.host_os == 'Darwin': # On Darwin, we default to `abort_on_error=1`, which would make tests run # much slower. Let's override this and run lit tests with 'abort_on_error=0'. diff --git a/compiler-rt/test/sanitizer_common/lit.site.cfg.py.in b/compiler-rt/test/sanitizer_common/lit.site.cfg.py.in index 38f5ca158463..e2db9482f916 100644 --- a/compiler-rt/test/sanitizer_common/lit.site.cfg.py.in +++ b/compiler-rt/test/sanitizer_common/lit.site.cfg.py.in @@ -6,6 +6,8 @@ config.tool_name = "@SANITIZER_COMMON_LIT_TEST_MODE@" config.target_cflags = "@SANITIZER_COMMON_TEST_TARGET_CFLAGS@" config.target_arch = "@SANITIZER_COMMON_TEST_TARGET_ARCH@" +config.arm_thumb = "@COMPILER_RT_ARM_THUMB@" + # Load common config for all compiler-rt lit tests. lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")