1 // RUN: %clangxx_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
6 const long kOffset
= 64*1024;
8 void *Thread(void *p
) {
10 ((char*)p
)[-kOffset
] = 43;
15 char *volatile p0
= new char[16];
17 char *p
= new char[32];
19 pthread_create(&th
, 0, Thread
, p
);
24 // Used to crash with CHECK failed.
25 // CHECK: WARNING: ThreadSanitizer: data race