1 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
14 static void handler(int sig
) {
20 static void* thr(void *p
) {
25 struct sigaction act
= {};
26 act
.sa_handler
= &handler
;
27 if (sigaction(SIGPROF
, &act
, 0)) {
33 t
.it_value
.tv_sec
= 0;
34 t
.it_value
.tv_usec
= 10;
35 t
.it_interval
= t
.it_value
;
36 if (setitimer(ITIMER_PROF
, &t
, 0)) {
41 for (int i
= 0; i
< 10000; i
++) {
43 pthread_create(&th
, 0, thr
, 0);
47 fprintf(stderr
, "DONE\n");
51 // CHECK-NOT: WARNING: ThreadSanitizer:
53 // CHECK-NOT: WARNING: ThreadSanitizer: