Fangrui Song 0c60b4b8a9 [ubsan][test] Replace arch= features with TARGET=
Similar to e6e4362901ae95b455366f907fb1145938808208
2023-08-18 16:09:20 -07:00

15 lines
458 B
C++

// REQUIRES: ubsan-standalone
// REQUIRES: target={{x86_64.*}}
// REQUIRES: librt_has_multf3
// RUN: %clangxx -fsanitize=bool -static %s -o %t && UBSAN_OPTIONS=handle_segv=0:handle_sigbus=0:handle_sigfpe=0 %run %t 2>&1 | FileCheck %s
#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
}