Skip to content

Commit

Permalink
Actual Linux/sparc64 testing found that hundreds of sparcv9 test `F…
Browse files Browse the repository at this point in the history
…AIL`.

In hindsight this is no wonder: while
`compiler-rt/lib/asan/asan_mapping_sparc64.h` has support for the
Linux/sparc64 VA hole,
```
commit 9df0754
Author: Vitaly Buka <vitalybuka@google.com>
Date:   Tue Mar 12 21:02:24 2019 +0000

    AddressSanitizer: 64-bit SPARC/Linux port
```
there's nothing corresponding in `clang`.  Also, `gcc` disables 64-bit ASan
on Linux/sparc64, too.

So this patch disables `sparcv9` ASan testing in general.

Tested on `sparcv9-sun-solaris2.11` and `sparc64-unknown-linux-gnu`
  • Loading branch information
rorth committed Sep 13, 2024
1 parent c2483ae commit 7b8142d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS AND NOT ANDROID)
if(APPLE)
darwin_filter_host_archs(ASAN_SUPPORTED_ARCH ASAN_TEST_ARCH)
endif()
list(REMOVE_ITEM ASAN_TEST_ARCH sparcv9)
if(OS_NAME MATCHES "SunOS")
list(REMOVE_ITEM ASAN_TEST_ARCH sparcv9)
list(REMOVE_ITEM ASAN_TEST_ARCH x86_64)
endif()

Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/test/asan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ set(ASAN_TEST_ARCH ${ASAN_SUPPORTED_ARCH})
if(APPLE)
darwin_filter_host_archs(ASAN_SUPPORTED_ARCH ASAN_TEST_ARCH)
endif()
list(REMOVE_ITEM ASAN_TEST_ARCH sparcv9)
if(OS_NAME MATCHES "SunOS")
list(REMOVE_ITEM ASAN_TEST_ARCH sparcv9)
list(REMOVE_ITEM ASAN_TEST_ARCH x86_64)
endif()

Expand Down
4 changes: 3 additions & 1 deletion compiler-rt/test/sanitizer_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ foreach(tool ${SUPPORTED_TOOLS})
if(APPLE)
darwin_filter_host_archs(${tool_toupper}_SUPPORTED_ARCH TEST_ARCH)
endif()
if(OS_NAME MATCHES "SunOS" AND ${tool} STREQUAL "asan")
if(${tool} STREQUAL "asan")
list(REMOVE_ITEM TEST_ARCH sparcv9)
endif()
if(OS_NAME MATCHES "SunOS" AND ${tool} STREQUAL "asan")
list(REMOVE_ITEM TEST_ARCH x86_64)
endif()

Expand Down
6 changes: 3 additions & 3 deletions compiler-rt/test/ubsan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ foreach(arch ${UBSAN_TEST_ARCH})
if(COMPILER_RT_HAS_ASAN AND ";${ASAN_SUPPORTED_ARCH};" MATCHES ";${arch};")
# TODO(wwchrome): Re-enable ubsan for asan win 64-bit when ready.
# Disable ubsan with AddressSanitizer tests for Windows 64-bit,
# 64-bit Solaris/SPARC and Solaris/x86.
# 64-bit Solaris/x86 and 64-bit SPARC.
if((NOT (OS_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8)) AND
(NOT (OS_NAME MATCHES "SunOS" AND ${arch} MATCHES sparcv9)) AND
(NOT (OS_NAME MATCHES "SunOS" AND ${arch} MATCHES x86_64)))
(NOT (OS_NAME MATCHES "SunOS" AND ${arch} MATCHES x86_64)) AND
(NOT ${arch} MATCHES sparcv9))
add_ubsan_testsuites("AddressSanitizer" asan ${arch})
endif()
endif()
Expand Down

0 comments on commit 7b8142d

Please sign in to comment.