Rainer Orth 5c2b510f88
[ubsan][test] Skip Misc/Posix/static-link.cpp on Solaris (#175464)
The `UBSan-Standalone-x86_64 :: TestCases/Misc/Posix/static-link.cpp`
test currently `FAIL`s on Solaris/x86_64 with
```
ld: fatal: option '-z record' is incompatible with building a static executable
```
One cannot create static executables on Solaris since no `libc.a` is
delivered, so this patch skips the test.

Tested on `x86_64-pc-solaris2.11`.
2026-02-05 20:07:17 -08:00

21 lines
589 B
C++

// RUN: %clangxx -fsanitize=bool -static %s -o %t && env UBSAN_OPTIONS=handle_segv=0:handle_sigbus=0:handle_sigfpe=0 %run %t 2>&1 | FileCheck %s
// RUN: %run %t 2>&1 | FileCheck %s
// REQUIRES: ubsan-standalone
// REQUIRES: target={{x86_64.*}}
// UNSUPPORTED: i386-target-arch, internal_symbolizer
// Does not link.
// UNSUPPORTED: darwin,target={{.*solaris.*}}
#include <signal.h>
#include <stdio.h>
int main() {
struct sigaction old_action;
sigaction(SIGINT, nullptr, &old_action);
// CHECK: Warning: REAL(sigaction_symname) == nullptr.
printf("PASS\n");
// CHECK: PASS
}