1 // RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
8 static void handler(int, siginfo_t
*, void*) {
9 // CHECK: WARNING: ThreadSanitizer: signal-unsafe call inside of a signal
11 // CHECK: #{{(1|2)}} handler(int, siginfo{{(_t)?}}*, void*) {{.*}}signal_malloc.cc:[[@LINE+2]]
12 // CHECK: SUMMARY: ThreadSanitizer: signal-unsafe call inside of a signal{{.*}}handler
13 volatile char *p
= (char*)malloc(1);
19 struct sigaction act
= {};
20 act
.sa_sigaction
= &handler
;
21 sigaction(SIGPROF
, &act
, 0);
22 kill(getpid(), SIGPROF
);