1 // RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
7 void bar(jmp_buf env
) {
13 void foo(jmp_buf env
) {
21 pthread_mutex_init(&mtx
, 0);
22 pthread_mutex_lock(&mtx
);
23 pthread_mutex_destroy(&mtx
);
28 if (setjmp(env
) == 42) {
43 // CHECK: WARNING: ThreadSanitizer: destroy of a locked mutex
44 // CHECK: #0 pthread_mutex_destroy