Mercurial > hg > CbC > CbC_llvm
comparison compiler-rt/test/tsan/thread_end_with_ignore.cpp @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 2e18cbf3894f |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s | |
2 #include <pthread.h> | |
3 #include <stdio.h> | |
4 | |
5 extern "C" void AnnotateIgnoreReadsBegin(const char *f, int l); | |
6 | |
7 void *Thread(void *x) { | |
8 AnnotateIgnoreReadsBegin("", 0); | |
9 return 0; | |
10 } | |
11 | |
12 int main() { | |
13 pthread_t t; | |
14 pthread_create(&t, 0, Thread, 0); | |
15 pthread_join(t, 0); | |
16 } | |
17 | |
18 // CHECK: ThreadSanitizer: thread T1 finished with ignores enabled, created at: | |
19 // CHECK: #0 pthread_create | |
20 // CHECK: #1 main | |
21 // CHECK: Ignore was enabled at: | |
22 // CHECK: #0 AnnotateIgnoreReadsBegin | |
23 // CHECK: #1 Thread | |
24 |