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_leak3.c
blob
efc4dd024f9e81679993e837b3e3761af23ca6bb
1
// RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
2
#include <pthread.h>
3
#include <unistd.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
sleep
(
1
);
13
return
0
;
14
}
15
16
// CHECK: WARNING: ThreadSanitizer: thread leak
17
// CHECK: SUMMARY: ThreadSanitizer: thread leak{{.*}}main