2014-05-30 22:08:51 +08:00
|
|
|
// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
|
2013-05-21 16:12:35 +08:00
|
|
|
#include <pthread.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
extern "C" void AnnotateIgnoreReadsBegin(const char *f, int l);
|
|
|
|
|
|
|
|
void *Thread(void *x) {
|
|
|
|
AnnotateIgnoreReadsBegin("", 0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
pthread_t t;
|
|
|
|
pthread_create(&t, 0, Thread, 0);
|
|
|
|
pthread_join(t, 0);
|
|
|
|
}
|
|
|
|
|
2013-11-27 19:30:28 +08:00
|
|
|
// CHECK: ThreadSanitizer: thread T1 finished with ignores enabled, created at:
|
|
|
|
// CHECK: #0 pthread_create
|
|
|
|
// CHECK: #1 main
|
|
|
|
// CHECK: Ignore was enabled at:
|
|
|
|
// CHECK: #0 AnnotateIgnoreReadsBegin
|
|
|
|
// CHECK: #1 Thread
|
2013-05-21 16:12:35 +08:00
|
|
|
|