repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
compiler-rt
/
test
/
tsan
/
thread_leak.c
blob
9b42b16b72a4b8dfd6709e49e3e6a0ce9ed818e9
1
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
2
#include <pthread.h>
3
#include <stdio.h>
4
5
void
*
Thread
(
void
*
x
) {
6
return
0
;
7
}
8
9
int
main
() {
10
pthread_t t
;
11
pthread_create
(&
t
,
0
,
Thread
,
0
);
12
pthread_join
(
t
,
0
);
13
fprintf
(
stderr
,
"PASS
\n
"
);
14
return
0
;
15
}
16
17
// CHECK-NOT: WARNING: ThreadSanitizer: thread leak