Make ASan and TSan tests a bit less brittle with @LINE FileCheck macro

llvm-svn: 171181
diff --git a/compiler-rt/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc b/compiler-rt/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc
index c43b1f5..645fe1c 100644
--- a/compiler-rt/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc
+++ b/compiler-rt/lib/asan/lit_tests/Linux/initialization-bug-any-order.cc
@@ -22,7 +22,7 @@
   return y + 1;
   // CHECK: {{AddressSanitizer: initialization-order-fiasco}}
   // CHECK: {{READ of size .* at 0x.* thread T0}}
-  // CHECK: {{#0 0x.* in .*initX.* .*initialization-bug-any-order.cc:22}}
+  // CHECK: {{#0 0x.* in .*initX.* .*initialization-bug-any-order.cc:}}[[@LINE-3]]
   // CHECK: {{0x.* is located 0 bytes inside of global variable .*y.*}}
 }
 
diff --git a/compiler-rt/lib/asan/lit_tests/global-overflow.cc b/compiler-rt/lib/asan/lit_tests/global-overflow.cc
index fec3ce8..6a2f12e 100644
--- a/compiler-rt/lib/asan/lit_tests/global-overflow.cc
+++ b/compiler-rt/lib/asan/lit_tests/global-overflow.cc
@@ -17,7 +17,7 @@
   memset(ZZZ, 0, 10);
   int res = YYY[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*global-overflow.cc:18}}
+  // CHECK: {{    #0 0x.* in _?main .*global-overflow.cc:}}[[@LINE-2]]
   // CHECK: {{0x.* is located 0 bytes to the right of global variable}}
   // CHECK:   {{.*YYY.* of size 10}}
   res += XXX[argc] + ZZZ[argc];
diff --git a/compiler-rt/lib/asan/lit_tests/heap-overflow.cc b/compiler-rt/lib/asan/lit_tests/heap-overflow.cc
index 2cd6d03..2648ec7 100644
--- a/compiler-rt/lib/asan/lit_tests/heap-overflow.cc
+++ b/compiler-rt/lib/asan/lit_tests/heap-overflow.cc
@@ -22,7 +22,7 @@
   memset(x, 0, 10);
   int res = x[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*heap-overflow.cc:23}}
+  // CHECK: {{    #0 0x.* in _?main .*heap-overflow.cc:}}[[@LINE-2]]
   // CHECK: {{0x.* is located 0 bytes to the right of 10-byte region}}
   // CHECK: {{allocated by thread T0 here:}}
 
diff --git a/compiler-rt/lib/asan/lit_tests/large_func_test.cc b/compiler-rt/lib/asan/lit_tests/large_func_test.cc
index f67b150..a748288 100644
--- a/compiler-rt/lib/asan/lit_tests/large_func_test.cc
+++ b/compiler-rt/lib/asan/lit_tests/large_func_test.cc
@@ -29,7 +29,14 @@
   x[8]++;
   x[9]++;
 
+  // CHECK: {{.*ERROR: AddressSanitizer: heap-buffer-overflow on address}}
+  // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
+  // CHECK: {{READ of size 4 at 0x.* thread T0}}
   x[zero + 111]++;  // we should report this exact line
+  // atos incorrectly extracts the symbol name for the static functions on
+  // Darwin.
+  // CHECK-Linux:  {{#0 0x.* in LargeFunction.*large_func_test.cc:}}[[@LINE-3]]
+  // CHECK-Darwin: {{#0 0x.* in .*LargeFunction.*large_func_test.cc}}:[[@LINE-4]]
 
   x[10]++;
   x[11]++;
@@ -46,20 +53,10 @@
 int main(int argc, char **argv) {
   int *x = new int[100];
   LargeFunction(x, argc - 1);
+  // CHECK: {{    #1 0x.* in _?main .*large_func_test.cc:}}[[@LINE-1]]
+  // CHECK: {{0x.* is located 44 bytes to the right of 400-byte region}}
+  // CHECK: {{allocated by thread T0 here:}}
+  // CHECK: {{    #0 0x.* in operator new.*}}
+  // CHECK: {{    #1 0x.* in _?main .*large_func_test.cc:}}[[@LINE-6]]
   delete x;
 }
-
-// CHECK: {{.*ERROR: AddressSanitizer: heap-buffer-overflow on address}}
-// CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
-// CHECK: {{READ of size 4 at 0x.* thread T0}}
-
-// atos incorrectly extracts the symbol name for the static functions on
-// Darwin.
-// CHECK-Linux:  {{    #0 0x.* in LargeFunction.*large_func_test.cc:32}}
-// CHECK-Darwin: {{    #0 0x.* in .*LargeFunction.*large_func_test.cc:32}}
-
-// CHECK: {{    #1 0x.* in _?main .*large_func_test.cc:48}}
-// CHECK: {{0x.* is located 44 bytes to the right of 400-byte region}}
-// CHECK: {{allocated by thread T0 here:}}
-// CHECK: {{    #0 0x.* in operator new.*}}
-// CHECK: {{    #1 0x.* in _?main .*large_func_test.cc:47}}
diff --git a/compiler-rt/lib/asan/lit_tests/null_deref.cc b/compiler-rt/lib/asan/lit_tests/null_deref.cc
index 64aec12..60a521d 100644
--- a/compiler-rt/lib/asan/lit_tests/null_deref.cc
+++ b/compiler-rt/lib/asan/lit_tests/null_deref.cc
@@ -17,18 +17,15 @@
 
 __attribute__((noinline))
 static void NullDeref(int *ptr) {
-  ptr[10]++;
+  // CHECK: ERROR: AddressSanitizer: SEGV on unknown address
+  // CHECK:   {{0x0*00028 .*pc 0x.*}}
+  // CHECK: {{AddressSanitizer can not provide additional info.}}
+  ptr[10]++;  // BOOM
+  // atos on Mac cannot extract the symbol name correctly.
+  // CHECK-Linux: {{    #0 0x.* in NullDeref.*null_deref.cc:}}[[@LINE-2]]
+  // CHECK-Darwin: {{    #0 0x.* in .*NullDeref.*null_deref.cc:}}[[@LINE-3]]
 }
 int main() {
   NullDeref((int*)0);
+  // CHECK: {{    #1 0x.* in _?main.*null_deref.cc:}}[[@LINE-1]]
 }
-
-// CHECK: ERROR: AddressSanitizer: SEGV on unknown address
-// CHECK:   {{0x0*00028 .*pc 0x.*}}
-// CHECK: {{AddressSanitizer can not provide additional info.}}
-
-// atos on Mac cannot extract the symbol name correctly.
-// CHECK-Linux: {{    #0 0x.* in NullDeref.*null_deref.cc:20}}
-// CHECK-Darwin: {{    #0 0x.* in .*NullDeref.*null_deref.cc:20}}
-
-// CHECK: {{    #1 0x.* in _?main.*null_deref.cc:23}}
diff --git a/compiler-rt/lib/asan/lit_tests/sanity_check_pure_c.c b/compiler-rt/lib/asan/lit_tests/sanity_check_pure_c.c
index 2b5090b..3d83065 100644
--- a/compiler-rt/lib/asan/lit_tests/sanity_check_pure_c.c
+++ b/compiler-rt/lib/asan/lit_tests/sanity_check_pure_c.c
@@ -13,7 +13,7 @@
   return x[5];
   // CHECK: heap-use-after-free
   // CHECK: free
-  // CHECK: main{{.*}}sanity_check_pure_c.c:12
+  // CHECK: main{{.*}}sanity_check_pure_c.c:[[@LINE-4]]
   // CHECK: malloc
-  // CHECK: main{{.*}}sanity_check_pure_c.c:11
+  // CHECK: main{{.*}}sanity_check_pure_c.c:[[@LINE-7]]
 }
diff --git a/compiler-rt/lib/asan/lit_tests/shared-lib-test.cc b/compiler-rt/lib/asan/lit_tests/shared-lib-test.cc
index fdda352..05bf3ecd 100644
--- a/compiler-rt/lib/asan/lit_tests/shared-lib-test.cc
+++ b/compiler-rt/lib/asan/lit_tests/shared-lib-test.cc
@@ -49,6 +49,6 @@
   // CHECK: {{.*ERROR: AddressSanitizer: global-buffer-overflow}}
   // CHECK: {{READ of size 4 at 0x.* thread T0}}
   // CHECK: {{    #0 0x.*}}
-  // CHECK: {{    #1 0x.* in _?main .*shared-lib-test.cc:48}}
+  // CHECK: {{    #1 0x.* in _?main .*shared-lib-test.cc:}}[[@LINE-4]]
   return 0;
 }
diff --git a/compiler-rt/lib/asan/lit_tests/stack-overflow.cc b/compiler-rt/lib/asan/lit_tests/stack-overflow.cc
index 0caa7df..3deb1e9 100644
--- a/compiler-rt/lib/asan/lit_tests/stack-overflow.cc
+++ b/compiler-rt/lib/asan/lit_tests/stack-overflow.cc
@@ -13,7 +13,7 @@
   memset(x, 0, 10);
   int res = x[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*stack-overflow.cc:14}}
+  // CHECK: {{    #0 0x.* in _?main .*stack-overflow.cc:}}[[@LINE-2]]
   // CHECK: {{Address 0x.* is .* frame <main>}}
   return res;
 }
diff --git a/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc b/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc
index 9381f13..1871184 100644
--- a/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc
+++ b/compiler-rt/lib/asan/lit_tests/strncpy-overflow.cc
@@ -25,16 +25,16 @@
   // CHECK: {{WRITE of size 1 at 0x.* thread T0}}
   // CHECK-Linux: {{    #0 0x.* in .*strncpy}}
   // CHECK-Darwin: {{    #0 0x.* in _?wrap_strncpy}}
-  // CHECK: {{    #1 0x.* in _?main .*strncpy-overflow.cc:24}}
+  // CHECK: {{    #1 0x.* in _?main .*strncpy-overflow.cc:}}[[@LINE-4]]
   // CHECK: {{0x.* is located 0 bytes to the right of 9-byte region}}
   // CHECK: {{allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
-  // CHECK-Linux: {{    #1 0x.* in main .*strncpy-overflow.cc:23}}
+  // CHECK-Linux: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-10]]
 
   // CHECK-Darwin: {{    #0 0x.* in .*mz_malloc.*}}
   // CHECK-Darwin: {{    #1 0x.* in malloc_zone_malloc.*}}
   // CHECK-Darwin: {{    #2 0x.* in malloc.*}}
-  // CHECK-Darwin: {{    #3 0x.* in _?main .*strncpy-overflow.cc:23}}
+  // CHECK-Darwin: {{    #3 0x.* in _?main .*strncpy-overflow.cc:}}[[@LINE-15]]
   return short_buffer[8];
 }
diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset1.cc b/compiler-rt/lib/tsan/lit_tests/mutexset1.cc
index e27e056..f32a770 100644
--- a/compiler-rt/lib/tsan/lit_tests/mutexset1.cc
+++ b/compiler-rt/lib/tsan/lit_tests/mutexset1.cc
@@ -20,6 +20,13 @@
 }
 
 int main() {
+  // CHECK: WARNING: ThreadSanitizer: data race
+  // CHECK:   Write of size 4 at {{.*}} by thread T1
+  // CHECK:                         (mutexes: write [[M1:M[0-9]+]]):
+  // CHECK:   Previous write of size 4 at {{.*}} by thread T2:
+  // CHECK:   Mutex [[M1]] created at:
+  // CHECK:     #0 pthread_mutex_init
+  // CHECK:     #1 main {{.*}}/mutexset1.cc:[[@LINE+1]]
   pthread_mutex_init(&mtx, 0);
   pthread_t t[2];
   pthread_create(&t[0], NULL, Thread1, NULL);
@@ -28,12 +35,3 @@
   pthread_join(t[1], NULL);
   pthread_mutex_destroy(&mtx);
 }
-
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK:   Write of size 4 at {{.*}} by thread T1
-// CHECK:                         (mutexes: write [[M1:M[0-9]+]]):
-// CHECK:   Previous write of size 4 at {{.*}} by thread T2:
-// CHECK:   Mutex [[M1]] created at:
-// CHECK:     #0 pthread_mutex_init
-// CHECK:     #1 main {{.*}}/mutexset1.cc:23
-
diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset2.cc b/compiler-rt/lib/tsan/lit_tests/mutexset2.cc
index 8c85043..15d2303 100644
--- a/compiler-rt/lib/tsan/lit_tests/mutexset2.cc
+++ b/compiler-rt/lib/tsan/lit_tests/mutexset2.cc
@@ -20,6 +20,13 @@
 }
 
 int main() {
+  // CHECK: WARNING: ThreadSanitizer: data race
+  // CHECK:   Write of size 4 at {{.*}} by thread T2:
+  // CHECK:   Previous write of size 4 at {{.*}} by thread T1
+  // CHECK:                     (mutexes: write [[M1:M[0-9]+]]):
+  // CHECK:   Mutex [[M1]] created at:
+  // CHECK:     #0 pthread_mutex_init
+  // CHECK:     #1 main {{.*}}/mutexset2.cc:[[@LINE+1]]
   pthread_mutex_init(&mtx, 0);
   pthread_t t[2];
   pthread_create(&t[0], NULL, Thread1, NULL);
@@ -28,12 +35,3 @@
   pthread_join(t[1], NULL);
   pthread_mutex_destroy(&mtx);
 }
-
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK:   Write of size 4 at {{.*}} by thread T2:
-// CHECK:   Previous write of size 4 at {{.*}} by thread T1
-// CHECK:                     (mutexes: write [[M1:M[0-9]+]]):
-// CHECK:   Mutex [[M1]] created at:
-// CHECK:     #0 pthread_mutex_init
-// CHECK:     #1 main {{.*}}/mutexset2.cc:23
-
diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset3.cc b/compiler-rt/lib/tsan/lit_tests/mutexset3.cc
index 63123f8..6ac7ad1 100644
--- a/compiler-rt/lib/tsan/lit_tests/mutexset3.cc
+++ b/compiler-rt/lib/tsan/lit_tests/mutexset3.cc
@@ -23,6 +23,16 @@
 }
 
 int main() {
+  // CHECK: WARNING: ThreadSanitizer: data race
+  // CHECK: Write of size 4 at {{.*}} by thread T1
+  // CHECK:               (mutexes: write [[M1:M[0-9]+]], write [[M2:M[0-9]+]]):
+  // CHECK:   Previous write of size 4 at {{.*}} by thread T2:
+  // CHECK:   Mutex [[M1]] created at:
+  // CHECK:     #0 pthread_mutex_init
+  // CHECK:     #1 main {{.*}}/mutexset3.cc:[[@LINE+4]]
+  // CHECK:   Mutex [[M2]] created at:
+  // CHECK:     #0 pthread_mutex_init
+  // CHECK:     #1 main {{.*}}/mutexset3.cc:[[@LINE+2]]
   pthread_mutex_init(&mtx1, 0);
   pthread_mutex_init(&mtx2, 0);
   pthread_t t[2];
@@ -33,15 +43,3 @@
   pthread_mutex_destroy(&mtx1);
   pthread_mutex_destroy(&mtx2);
 }
-
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK: Write of size 4 at {{.*}} by thread T1
-// CHECK:               (mutexes: write [[M1:M[0-9]+]], write [[M2:M[0-9]+]]):
-// CHECK:   Previous write of size 4 at {{.*}} by thread T2:
-// CHECK:   Mutex [[M1]] created at:
-// CHECK:     #0 pthread_mutex_init
-// CHECK:     #1 main {{.*}}/mutexset3.cc:26
-// CHECK:   Mutex [[M2]] created at:
-// CHECK:     #0 pthread_mutex_init
-// CHECK:     #1 main {{.*}}/mutexset3.cc:27
-
diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset4.cc b/compiler-rt/lib/tsan/lit_tests/mutexset4.cc
index 68ed475..75684cf 100644
--- a/compiler-rt/lib/tsan/lit_tests/mutexset4.cc
+++ b/compiler-rt/lib/tsan/lit_tests/mutexset4.cc
@@ -23,6 +23,16 @@
 }
 
 int main() {
+  // CHECK: WARNING: ThreadSanitizer: data race
+  // CHECK:   Write of size 4 at {{.*}} by thread T2:
+  // CHECK:   Previous write of size 4 at {{.*}} by thread T1
+  // CHECK:                 (mutexes: write [[M1:M[0-9]+]], write [[M2:M[0-9]+]]):
+  // CHECK:   Mutex [[M1]] created at:
+  // CHECK:     #0 pthread_mutex_init
+  // CHECK:     #1 main {{.*}}/mutexset4.cc:[[@LINE+4]]
+  // CHECK:   Mutex [[M2]] created at:
+  // CHECK:     #0 pthread_mutex_init
+  // CHECK:     #1 main {{.*}}/mutexset4.cc:[[@LINE+2]]
   pthread_mutex_init(&mtx1, 0);
   pthread_mutex_init(&mtx2, 0);
   pthread_t t[2];
@@ -33,15 +43,3 @@
   pthread_mutex_destroy(&mtx1);
   pthread_mutex_destroy(&mtx2);
 }
-
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK:   Write of size 4 at {{.*}} by thread T2:
-// CHECK:   Previous write of size 4 at {{.*}} by thread T1
-// CHECK:                 (mutexes: write [[M1:M[0-9]+]], write [[M2:M[0-9]+]]):
-// CHECK:   Mutex [[M1]] created at:
-// CHECK:     #0 pthread_mutex_init
-// CHECK:     #1 main {{.*}}/mutexset4.cc:26
-// CHECK:   Mutex [[M2]] created at:
-// CHECK:     #0 pthread_mutex_init
-// CHECK:     #1 main {{.*}}/mutexset4.cc:27
-
diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset5.cc b/compiler-rt/lib/tsan/lit_tests/mutexset5.cc
index 85fdadd..6e75810 100644
--- a/compiler-rt/lib/tsan/lit_tests/mutexset5.cc
+++ b/compiler-rt/lib/tsan/lit_tests/mutexset5.cc
@@ -23,6 +23,17 @@
 }
 
 int main() {
+  // CHECK: WARNING: ThreadSanitizer: data race
+  // CHECK:   Write of size 4 at {{.*}} by thread T1
+  // CHECK:                              (mutexes: write [[M1:M[0-9]+]]):
+  // CHECK:   Previous write of size 4 at {{.*}} by thread T2
+  // CHECK:                              (mutexes: write [[M2:M[0-9]+]]):
+  // CHECK:   Mutex [[M1]] created at:
+  // CHECK:     #0 pthread_mutex_init
+  // CHECK:     #1 main {{.*}}/mutexset5.cc:[[@LINE+4]]
+  // CHECK:   Mutex [[M2]] created at:
+  // CHECK:     #0 pthread_mutex_init
+  // CHECK:     #1 main {{.*}}/mutexset5.cc:[[@LINE+5]]
   pthread_mutex_init(&mtx1, 0);
   pthread_mutex_init(&mtx2, 0);
   pthread_t t[2];
@@ -33,16 +44,3 @@
   pthread_mutex_destroy(&mtx1);
   pthread_mutex_destroy(&mtx2);
 }
-
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK:   Write of size 4 at {{.*}} by thread T1
-// CHECK:                              (mutexes: write [[M1:M[0-9]+]]):
-// CHECK:   Previous write of size 4 at {{.*}} by thread T2
-// CHECK:                              (mutexes: write [[M2:M[0-9]+]]):
-// CHECK:   Mutex [[M1]] created at:
-// CHECK:     #0 pthread_mutex_init
-// CHECK:     #1 main {{.*}}/mutexset5.cc:26
-// CHECK:   Mutex [[M2]] created at:
-// CHECK:     #0 pthread_mutex_init
-// CHECK:     #1 main {{.*}}/mutexset5.cc:27
-
diff --git a/compiler-rt/lib/tsan/lit_tests/mutexset6.cc b/compiler-rt/lib/tsan/lit_tests/mutexset6.cc
index b28c21c..4b19a12 100644
--- a/compiler-rt/lib/tsan/lit_tests/mutexset6.cc
+++ b/compiler-rt/lib/tsan/lit_tests/mutexset6.cc
@@ -28,6 +28,17 @@
 }
 
 int main() {
+  // CHECK: WARNING: ThreadSanitizer: data race
+  // CHECK:   Write of size 4 at {{.*}} by thread T1
+  // CHECK:                          (mutexes: write [[M1:M[0-9]+]]):
+  // CHECK:   Previous write of size 4 at {{.*}} by thread T2
+  // CHECK:               (mutexes: write [[M2:M[0-9]+]], read [[M3:M[0-9]+]]):
+  // CHECK:   Mutex [[M1]] created at:
+  // CHECK:     #1 main {{.*}}/mutexset6.cc:[[@LINE+5]]
+  // CHECK:   Mutex [[M2]] created at:
+  // CHECK:     #1 main {{.*}}/mutexset6.cc:[[@LINE+4]]
+  // CHECK:   Mutex [[M3]] created at:
+  // CHECK:     #1 main {{.*}}/mutexset6.cc:[[@LINE+3]]
   pthread_mutex_init(&mtx1, 0);
   pthread_spin_init(&mtx2, 0);
   pthread_rwlock_init(&mtx3, 0);
@@ -40,16 +51,3 @@
   pthread_spin_destroy(&mtx2);
   pthread_rwlock_destroy(&mtx3);
 }
-
-// CHECK: WARNING: ThreadSanitizer: data race
-// CHECK:   Write of size 4 at {{.*}} by thread T1
-// CHECK:                          (mutexes: write [[M1:M[0-9]+]]):
-// CHECK:   Previous write of size 4 at {{.*}} by thread T2
-// CHECK:               (mutexes: write [[M2:M[0-9]+]], read [[M3:M[0-9]+]]):
-// CHECK:   Mutex [[M1]] created at:
-// CHECK:     #1 main {{.*}}/mutexset6.cc:31
-// CHECK:   Mutex [[M2]] created at:
-// CHECK:     #1 main {{.*}}/mutexset6.cc:32
-// CHECK:   Mutex [[M3]] created at:
-// CHECK:     #1 main {{.*}}/mutexset6.cc:33
-
diff --git a/compiler-rt/lib/tsan/lit_tests/signal_malloc.cc b/compiler-rt/lib/tsan/lit_tests/signal_malloc.cc
index 86ae436..cee997c 100644
--- a/compiler-rt/lib/tsan/lit_tests/signal_malloc.cc
+++ b/compiler-rt/lib/tsan/lit_tests/signal_malloc.cc
@@ -6,6 +6,9 @@
 #include <unistd.h>
 
 static void handler(int, siginfo_t*, void*) {
+  // CHECK: WARNING: ThreadSanitizer: signal-unsafe call inside of a signal
+  // CHECK:     #0 malloc
+  // CHECK:     #1 handler(int, siginfo*, void*) {{.*}}signal_malloc.cc:[[@LINE+1]]
   volatile char *p = (char*)malloc(1);
   p[0] = 0;
   free((void*)p);
@@ -20,7 +23,3 @@
   return 0;
 }
 
-// CHECK: WARNING: ThreadSanitizer: signal-unsafe call inside of a signal
-// CHECK:     #0 malloc
-// CHECK:     #1 handler(int, siginfo*, void*) {{.*}}signal_malloc.cc:9
-