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

source code of compiler-rt/test/ubsan/TestCases/Misc/Linux/static-link.cpp