Skip to content

Commit

Permalink
[ubsan][test] Don't disable ubsan testing on 64-bit Solaris/x86
Browse files Browse the repository at this point in the history
Unlike asan, which isn't supported yet on 64-bit Solaris/x86, there's no reason to disable
ubsan.  This patch does that, but keeps the 64-bit ubsan-with-asan tests disabled.

Tested on x86_64-pc-solaris2.11.

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

llvm-svn: 365302
  • Loading branch information
rorth committed Jul 8, 2019
1 parent 0b9addb commit d11df93
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 4 additions & 5 deletions compiler-rt/test/ubsan/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -38,9 +38,6 @@ set(UBSAN_TEST_ARCH ${UBSAN_SUPPORTED_ARCH})
if(APPLE)
darwin_filter_host_archs(UBSAN_SUPPORTED_ARCH UBSAN_TEST_ARCH)
endif()
if(OS_NAME MATCHES "SunOS")
list(REMOVE_ITEM UBSAN_TEST_ARCH x86_64)
endif()

foreach(arch ${UBSAN_TEST_ARCH})
set(UBSAN_TEST_TARGET_ARCH ${arch})
@@ -49,8 +46,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.
if(NOT OS_NAME MATCHES "Windows" OR CMAKE_SIZEOF_VOID_P EQUAL 4)
# Disable ubsan with AddressSanitizer tests for Windows 64-bit and
# 64-bit Solaris/x86.
if((NOT (OS_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8)) AND
(NOT (OS_NAME MATCHES "SunOS" AND ${arch} MATCHES x86_64)))
add_ubsan_testsuites("AddressSanitizer" asan ${arch})
endif()
endif()
3 changes: 0 additions & 3 deletions compiler-rt/test/ubsan_minimal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -4,9 +4,6 @@ set(UBSAN_TEST_ARCH ${UBSAN_SUPPORTED_ARCH})
if(APPLE)
darwin_filter_host_archs(UBSAN_SUPPORTED_ARCH UBSAN_TEST_ARCH)
endif()
if(OS_NAME MATCHES "SunOS")
list(REMOVE_ITEM UBSAN_TEST_ARCH x86_64)
endif()

set(UBSAN_TESTSUITES)
set(UBSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})

0 comments on commit d11df93

Please sign in to comment.