[PATCH] D119016: [Sanitizers][test] XFAIL long double tests on Solaris/sparc

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 09:44:59 PST 2022


ro created this revision.
ro added a reviewer: vitalybuka.
ro added a project: Sanitizers.
Herald added subscribers: fedor.sergeev, jyknight.
ro requested review of this revision.
Herald added a subscriber: Sanitizers.

As reported in Issue #41838, `clang` doesn't correctly implement `long double` on 32-bit Solaris/SPARC: the psABI requires this to be an 128-bit type.  Four sanitizer tests currently `FAIL` for this reason.

While there is a WIP patch to fix `clang` (D89130 <https://reviews.llvm.org/D89130>), it isn't complete yet and I've hit so many brick walls while trying to finish it that I'm unsure if I ever will.

This patch therefore `XFAIL`s those tests in the meantime.

Tested on `sparcv9-sun-solaris2.11`.

There's one issue, though: when running a 1-stage build with `gcc` (which doesn't have this bug), two of the tests `XPASS`.  I'd like to `XFAIL` them only for `clang` and see several tests using a `clang` keyword with `XFAIL`, but this doesn't work in `compiler-rt` and I haven't yet found how to do this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119016

Files:
  compiler-rt/test/sanitizer_common/TestCases/printf-ldbl.c
  compiler-rt/test/sanitizer_common/TestCases/scanf-ldbl.c
  compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp
  compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp


Index: compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp
===================================================================
--- compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp
+++ compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp
@@ -25,6 +25,9 @@
 // FIXME: log_path is not supported on Windows yet.
 // XFAIL: windows-msvc
 
+// Issue #41838
+// XFAIL: sparc-target-arch && solaris
+
 #include <stdio.h>
 #include <stdlib.h>
 int main(int argc, char *argv[]) {
Index: compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp
===================================================================
--- compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp
+++ compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp
@@ -11,6 +11,9 @@
 // FIXME: not %run %t 8 2>&1 | FileCheck %s --check-prefix=CHECK-8
 // RUN: not %run %t 9 2>&1 | FileCheck %s --check-prefix=CHECK-9
 
+// Issue #41838
+// XFAIL: sparc-target-arch && solaris
+
 // This test assumes float and double are IEEE-754 single- and double-precision.
 
 #if defined(__APPLE__)
Index: compiler-rt/test/sanitizer_common/TestCases/scanf-ldbl.c
===================================================================
--- compiler-rt/test/sanitizer_common/TestCases/scanf-ldbl.c
+++ compiler-rt/test/sanitizer_common/TestCases/scanf-ldbl.c
@@ -1,5 +1,8 @@
 // RUN: %clang %s -o %t && %run %t 2>&1
 
+// Issue #41838
+// XFAIL: sparc-target-arch && solaris
+
 #include <assert.h>
 #include <stdio.h>
 #include <string.h>
Index: compiler-rt/test/sanitizer_common/TestCases/printf-ldbl.c
===================================================================
--- compiler-rt/test/sanitizer_common/TestCases/printf-ldbl.c
+++ compiler-rt/test/sanitizer_common/TestCases/printf-ldbl.c
@@ -1,5 +1,8 @@
 // RUN: %clang %s -o %t && %run %t 2>&1
 
+// Issue #41838
+// XFAIL: sparc-target-arch && solaris
+
 #include <assert.h>
 #include <stdio.h>
 #include <string.h>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119016.405952.patch
Type: text/x-patch
Size: 1930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220204/2cd72db6/attachment.bin>


More information about the llvm-commits mailing list