[compiler-rt] 55e472e - [compiler-rt][asan][test] Skipt sanitizer_common tests on Sparc

Rainer Orth via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 01:21:27 PDT 2020


Author: Rainer Orth
Date: 2020-08-13T10:20:52+02:00
New Revision: 55e472e9dab68c0cb21a65237c5240dfe6105c01

URL: https://github.com/llvm/llvm-project/commit/55e472e9dab68c0cb21a65237c5240dfe6105c01
DIFF: https://github.com/llvm/llvm-project/commit/55e472e9dab68c0cb21a65237c5240dfe6105c01.diff

LOG: [compiler-rt][asan][test] Skipt sanitizer_common tests on Sparc

When building on `sparc64-unknown-linux-gnu`, I found that a large number
of `SanitizerCommon-asan-sparc*-Linux` tests were `FAIL`ing, like

   SanitizerCommon-asan-sparc-Linux :: Linux/aligned_alloc-alignment.cpp
  [...]
   SanitizerCommon-asan-sparcv9-Linux :: Linux/aligned_alloc-alignment.cpp
  [...]

many of them due to

  fatal error: error in backend: Function "_Z14User_OnSIGSEGViP9siginfo_tPv": over-aligned dynamic alloca not supported.

which breaks ASan on Sparc.  Currently ASan is only built for the benefit
of `gcc` where it does work.  However, when enabling the compilation in
`compiler-rt` to make certain it continues to build, I missed
`compiler-rt/test/sanitizer_common` when disabling ASan testing on Sparc
(it's not yet enabled on Solaris).

This patch fixes the issue.

Tested on `sparcv9-sun-solaris2.11` with the `sanitizer_comon` testsuite enabled.

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

Added: 
    

Modified: 
    compiler-rt/test/sanitizer_common/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/sanitizer_common/CMakeLists.txt b/compiler-rt/test/sanitizer_common/CMakeLists.txt
index fcd651ebe42d..3d17c008e01d 100644
--- a/compiler-rt/test/sanitizer_common/CMakeLists.txt
+++ b/compiler-rt/test/sanitizer_common/CMakeLists.txt
@@ -62,6 +62,9 @@ foreach(tool ${SUPPORTED_TOOLS})
   if(APPLE)
     darwin_filter_host_archs(${tool_toupper}_SUPPORTED_ARCH TEST_ARCH)
   endif()
+  if(${tool} STREQUAL "asan")
+    list(REMOVE_ITEM TEST_ARCH sparc sparcv9)
+  endif()
 
   # TODO(dliew): We should iterate over the 
diff erent
   # Apple platforms, not just macOS.


        


More information about the llvm-commits mailing list