1 // RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
4 void __attribute__((noinline
)) foo(int *mem
) {
8 void __attribute__((noinline
)) bar(int *mem
) {
13 int *mem
= (int*)malloc(100);
19 // CHECK: WARNING: ThreadSanitizer: heap-use-after-free
20 // CHECK: Write of size 4 at {{.*}} by main thread:
23 // CHECK: Previous write of size 8 at {{.*}} by main thread:
25 // CHECK: #{{1|2}} foo
26 // CHECK: #{{2|3}} main