Skip to content
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

[sanitizer_common][test] Disable sanitizer_coverage_trace_pc_guard.cp… #108206

Conversation

rorth
Copy link
Collaborator

@rorth rorth commented Sep 11, 2024

…p etc. on SPARC

When enabling ASan testing on SPARC as per PR #107405, two tests FAIL:

  SanitizerCommon-asan-sparc-SunOS :: sanitizer_coverage_trace_pc_guard-dso.cpp
  SanitizerCommon-asan-sparc-SunOS :: sanitizer_coverage_trace_pc_guard.cpp

The issue is the same in both cases:

WARNING: No coverage file for projects/compiler-rt/test/sanitizer_common/asan-sparc-SunOS/Output/sanitizer_coverage_trace_pc_guard.cpp.tmp
WARNING: No coverage file for sanitizer_coverage_trace_pc_guard.cpp.tmp.22766.sancov
ERROR: No valid coverage files given.

Checking the file with sancov -print reveals Wrong magic: 4294967090. There seems to be an endianess bug somewhere, since the tests are already disabled on other big-endian targets.

This patch matches this.

Tested on sparcv9-sun-solaris2.11.

…p etc. on SPARC

When enabling ASan testing on SPARC as per PR llvm#107405, two tests `FAIL`:
```
  SanitizerCommon-asan-sparc-SunOS :: sanitizer_coverage_trace_pc_guard-dso.cpp
  SanitizerCommon-asan-sparc-SunOS :: sanitizer_coverage_trace_pc_guard.cpp

```
The issue is the same in both cases:
```
WARNING: No coverage file for projects/compiler-rt/test/sanitizer_common/asan-sparc-SunOS/Output/sanitizer_coverage_trace_pc_guard.cpp.tmp
WARNING: No coverage file for sanitizer_coverage_trace_pc_guard.cpp.tmp.22766.sancov
ERROR: No valid coverage files given.

```
Checking the file with `sancov -print` reveals `Wrong magic: 4294967090`.
There seems to be an endianess bug somewhere, since the tests are already
disabled on other big-endian targets.

This patch matches this.

Tested on `sparcv9-sun-solaris2.11`.
@llvmbot
Copy link
Member

llvmbot commented Sep 11, 2024

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

Author: Rainer Orth (rorth)

Changes

…p etc. on SPARC

When enabling ASan testing on SPARC as per PR #107405, two tests FAIL:

  SanitizerCommon-asan-sparc-SunOS :: sanitizer_coverage_trace_pc_guard-dso.cpp
  SanitizerCommon-asan-sparc-SunOS :: sanitizer_coverage_trace_pc_guard.cpp

The issue is the same in both cases:

WARNING: No coverage file for projects/compiler-rt/test/sanitizer_common/asan-sparc-SunOS/Output/sanitizer_coverage_trace_pc_guard.cpp.tmp
WARNING: No coverage file for sanitizer_coverage_trace_pc_guard.cpp.tmp.22766.sancov
ERROR: No valid coverage files given.

Checking the file with sancov -print reveals Wrong magic: 4294967090. There seems to be an endianess bug somewhere, since the tests are already disabled on other big-endian targets.

This patch matches this.

Tested on sparcv9-sun-solaris2.11.


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

2 Files Affected:

  • (modified) compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp (+2-1)
  • (modified) compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp (+1-1)
diff --git a/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp b/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp
index 9a27bc89a5fae1..f6ccbb6981352b 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-dso.cpp
@@ -1,7 +1,8 @@
 // Tests trace pc guard coverage collection.
 
 // REQUIRES: has_sancovcc
-// UNSUPPORTED: ubsan,target={{(powerpc64|s390x|thumb).*}}
+// Doesn't work on big-endian targets.
+// UNSUPPORTED: ubsan,target={{(powerpc64|s390x|sparc|thumb).*}}
 // XFAIL: tsan,darwin
 // XFAIL: android && asan
 
diff --git a/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp b/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp
index b4b491455c390a..84c28e82f04ac1 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard.cpp
@@ -1,7 +1,7 @@
 // Tests trace pc guard coverage collection.
 
 // REQUIRES: has_sancovcc
-// UNSUPPORTED: ubsan,i386-darwin,target={{(powerpc64|s390x|thumb).*}}
+// UNSUPPORTED: ubsan,i386-darwin,target={{(powerpc64|s390x|sparc|thumb).*}}
 // This test is failing for lsan on darwin on x86_64h.
 // UNSUPPORTED: x86_64h-darwin && lsan
 // XFAIL: tsan

@rorth rorth merged commit d76966e into llvm:main Sep 16, 2024
10 checks passed
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