repo.or.cz
/
blocksruntime.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[ASan/Win] Add a comment about DCL-using-static vs threads
[blocksruntime.git]
/
test
/
tsan
/
thread_leak4.c
blob
0d3b8307000aae084105048e62cb9414ad1d76a9
1
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
2
#include <pthread.h>
3
#include <unistd.h>
4
#include <stdio.h>
5
6
void
*
Thread
(
void
*
x
) {
7
sleep
(
10
);
8
return
0
;
9
}
10
11
int
main
() {
12
pthread_t t
;
13
pthread_create
(&
t
,
0
,
Thread
,
0
);
14
printf
(
"OK
\n
"
);
15
return
0
;
16
}
17
18
// CHECK-NOT: WARNING: ThreadSanitizer: thread leak