• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s
2 #include <pthread.h>
3 
Thread(void * x)4 void *Thread(void *x) {
5   return 0;
6 }
7 
main()8 int main() {
9   pthread_t t;
10   pthread_create(&t, 0, Thread, 0);
11   return 0;
12 }
13 
14 // CHECK: WARNING: ThreadSanitizer: thread leak
15 // CHECK: SUMMARY: ThreadSanitizer: thread leak{{.*}}main
16