Skip to content

[compiler-rt] Don't exclude ubsan-asan tests on Windows/x86_64 #137171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

mstorsjo
Copy link
Member

This removes a leftover workaround from
00f3f6e from 2016. Currently the tests seem to work fine on x86_64 in both MSVC and mingw configurations with this workaround removed.

(On aarch64, asan isn't functional at all; this workaround used to hide that issue when running "check-ubsan", but the issue is apparent if running all tests with "check-compiler-rt" anyway.)

This removes a leftover workaround from
00f3f6e from 2016. Currently
the tests seem to work fine on x86_64 in both MSVC and mingw
configurations with this workaround removed.

(On aarch64, asan isn't functional at all; this workaround used
to hide that issue when running "check-ubsan", but the issue
is apparent if running all tests with "check-compiler-rt" anyway.)
@llvmbot
Copy link
Member

llvmbot commented Apr 24, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Martin Storsjö (mstorsjo)

Changes

This removes a leftover workaround from
00f3f6e from 2016. Currently the tests seem to work fine on x86_64 in both MSVC and mingw configurations with this workaround removed.

(On aarch64, asan isn't functional at all; this workaround used to hide that issue when running "check-ubsan", but the issue is apparent if running all tests with "check-compiler-rt" anyway.)


Full diff: https://github.com/llvm/llvm-project/pull/137171.diff

1 Files Affected:

  • (modified) compiler-rt/test/ubsan/CMakeLists.txt (+3-5)
diff --git a/compiler-rt/test/ubsan/CMakeLists.txt b/compiler-rt/test/ubsan/CMakeLists.txt
index 9b7fbe3c8f926..410585e6a07ef 100644
--- a/compiler-rt/test/ubsan/CMakeLists.txt
+++ b/compiler-rt/test/ubsan/CMakeLists.txt
@@ -49,11 +49,9 @@ foreach(arch ${UBSAN_TEST_ARCH})
   add_ubsan_testsuites("Standalone" ubsan ${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/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 x86_64)) AND
+    # Disable ubsan with AddressSanitizer tests for 64-bit Solaris/x86 and
+    # 64-bit SPARC.
+    if((NOT (OS_NAME MATCHES "SunOS" AND ${arch} MATCHES x86_64)) AND
        (NOT ${arch} MATCHES sparcv9))
       add_ubsan_testsuites("AddressSanitizer" asan ${arch})
     endif()

Copy link
Collaborator

@zmodem zmodem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm if it works :)

@mstorsjo mstorsjo merged commit 34660eb into llvm:main Apr 25, 2025
14 checks passed
@mstorsjo mstorsjo deleted the compiler-rt-remove-workaround branch April 25, 2025 09:16
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
…137171)

This removes a leftover workaround from
00f3f6e from 2016. Currently the tests
seem to work fine on x86_64 in both MSVC and mingw configurations with
this workaround removed.

(On aarch64, asan isn't functional at all; this workaround used to hide
that issue when running "check-ubsan", but the issue is apparent if
running all tests with "check-compiler-rt" anyway.)
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
…137171)

This removes a leftover workaround from
00f3f6e from 2016. Currently the tests
seem to work fine on x86_64 in both MSVC and mingw configurations with
this workaround removed.

(On aarch64, asan isn't functional at all; this workaround used to hide
that issue when running "check-ubsan", but the issue is apparent if
running all tests with "check-compiler-rt" anyway.)
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
…137171)

This removes a leftover workaround from
00f3f6e from 2016. Currently the tests
seem to work fine on x86_64 in both MSVC and mingw configurations with
this workaround removed.

(On aarch64, asan isn't functional at all; this workaround used to hide
that issue when running "check-ubsan", but the issue is apparent if
running all tests with "check-compiler-rt" anyway.)
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request May 9, 2025
…137171)

This removes a leftover workaround from
00f3f6e from 2016. Currently the tests
seem to work fine on x86_64 in both MSVC and mingw configurations with
this workaround removed.

(On aarch64, asan isn't functional at all; this workaround used to hide
that issue when running "check-ubsan", but the issue is apparent if
running all tests with "check-compiler-rt" anyway.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants