[compiler-rt] [ASan][test] XFAIL Linux/preinstalled_signal.cpp on Linux/sparc64 (PR #109623)

Rainer Orth via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 00:38:14 PDT 2024


https://github.com/rorth created https://github.com/llvm/llvm-project/pull/109623

With ASan testing enabled on SPARC as per PR #107405, the
```
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Linux/preinstalled_signal.cpp
```
test `FAIL`s on Linux/sparc64.  See Issue #109573 for all the details, but the core is that `syscall(__NR_rt_sigaction)` cannot be used because it takes an additional argument that isn't accessible outside of `libc`, while switching to `sigaction` instead changes the order of `AsanInitInternal` and `Init`, breaking the test.

Therefore this patch `XFAIL`s the test.

Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`.

>From 03501af96d8bacb73a50d403971968b8f45667e3 Mon Sep 17 00:00:00 2001
From: Rainer Orth <ro at gcc.gnu.org>
Date: Mon, 23 Sep 2024 09:36:12 +0200
Subject: [PATCH] [ASan][test] XFAIL Linux/preinstalled_signal.cpp on
 Linux/sparc64

With ASan testing enabled on SPARC as per PR #107405, the
```
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Linux/preinstalled_signal.cpp
```
test `FAIL`s on Linux/sparc64.  See Issue #109573 for all the details, but
the core is that `syscall(__NR_rt_sigaction)` cannot be used because it
takes an additional argument that isn't accessible outside of `libc`, while
switching to `sigaction` instead changes the order of `AsanInitInternal`
and `Init`, breaking the test.

Therefore this patch `XFAIL`s the test.

Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`.
---
 compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cpp b/compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cpp
index 71929fdd9b37fe..dd31693bc57083 100644
--- a/compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cpp
+++ b/compiler-rt/test/asan/TestCases/Linux/preinstalled_signal.cpp
@@ -17,6 +17,9 @@
 // This way of setting LD_PRELOAD does not work with Android test runner.
 // REQUIRES: !android
 
+// Issue #109573: Cannot use syscall(__NR_rt_sigaction) on Linux/sparc64.
+// XFAIL: target={{sparc.*-.*-linux.*}}
+
 #include <assert.h>
 #include <signal.h>
 #include <stdio.h>



More information about the llvm-commits mailing list