Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7cecbdf

Browse files
authored
[sanitizer_common] Adjust signal_send.cpp for Linux/sparc64 (llvm#100538)
``` SanitizerCommon-ubsan-sparc-Linux :: Linux/signal_send.cpp ``` currently `FAIL`s on Linux/sparc64 (32 and 64-bit). Instead of the expected values for `SIGUSR1` (`10`) and `SIGUSR1` (`12`), that target uses `30` and `31`. On Linux/x86_64, the signals get their values from `x86_64-linux-gnu/bits/signum-generic.h`, to be overridden in `x86_64-linux-gnu/bits/signum.h`. On Linux/sparc64 OTOH, the definitions are from `sparc64-linux-gnu/bits/signum-arch.h` and remain that way. There's no `signum.h` at all. The patch allows for both values. Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`.
1 parent 94394ca commit 7cecbdf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/test/sanitizer_common/TestCases/Linux/signal_send.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ void test_sigwait() {
6262
int res;
6363
res = fork_and_signal(s);
6464
fprintf(stderr, "fork_and_signal with SIGUSR1,2: %d\n", res);
65-
// CHECK: died with sig 10
65+
// CHECK: died with sig {{10|30}}
6666
// CHECK: fork_and_signal with SIGUSR1,2: 0
6767

6868
// test sigandset... s should only have SIGUSR2 now
6969
s = sigset_and(s, mkset(1, SIGUSR2));
7070
res = fork_and_signal(s);
7171
fprintf(stderr, "fork_and_signal with SIGUSR2: %d\n", res);
72-
// CHECK: died with sig 12
72+
// CHECK: died with sig {{12|31}}
7373
// CHECK: fork_and_signal with SIGUSR2: 0
7474
}
7575

0 commit comments

Comments
 (0)