| 1 | // 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 |
| 2 | // RUN: %run %t 2>&1 | FileCheck %s |
| 3 | |
| 4 | // REQUIRES: ubsan-standalone |
| 5 | // REQUIRES: target={{x86_64.*}} |
| 6 | // UNSUPPORTED: i386-target-arch, internal_symbolizer |
| 7 | |
| 8 | // Does not link. |
| 9 | // UNSUPPORTED: darwin |
| 10 | |
| 11 | #include <signal.h> |
| 12 | #include <stdio.h> |
| 13 | |
| 14 | int main() { |
| 15 | struct sigaction old_action; |
| 16 | sigaction(SIGINT, act: nullptr, oact: &old_action); |
| 17 | // CHECK: Warning: REAL(sigaction_symname) == nullptr. |
| 18 | printf(format: "PASS\n" ); |
| 19 | // CHECK: PASS |
| 20 | } |
| 21 | |