diff --git a/compiler-rt/test/tsan/signal_malloc.cpp b/compiler-rt/test/tsan/signal_malloc.cpp --- a/compiler-rt/test/tsan/signal_malloc.cpp +++ b/compiler-rt/test/tsan/signal_malloc.cpp @@ -10,6 +10,10 @@ // CHECK: SUMMARY: ThreadSanitizer: signal-unsafe call inside of a signal{{.*}}handler volatile char *p = (char*)malloc(1); p[0] = 0; + // CHECK: WARNING: ThreadSanitizer: signal-unsafe call inside of a signal + // CHECK: #0 free + // CHECK: #{{(1|2)}} handler(int, {{(__)?}}siginfo{{(_t)?}}*, void*) {{.*}}signal_malloc.cpp:[[@LINE+2]] + // CHECK: SUMMARY: ThreadSanitizer: signal-unsafe call inside of a signal{{.*}}handler free((void*)p); } @@ -19,6 +23,8 @@ sigaction(SIGPROF, &act, 0); kill(getpid(), SIGPROF); sleep(1); // let the signal handler run + fprintf(stderr, "DONE\n"); + // CHECK: DONE return 0; }