1 // RUN: %clang_tsan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
8 void bar(jmp_buf env
) {
11 memcpy(env2
, env
, sizeof(jmp_buf));
16 void foo(jmp_buf env
) {
24 pthread_mutex_init(&mtx
, 0);
25 pthread_mutex_lock(&mtx
);
26 pthread_mutex_destroy(&mtx
);
31 if (setjmp(env
) == 42) {
46 // CHECK: WARNING: ThreadSanitizer: destroy of a locked mutex
47 // CHECK: #0 pthread_mutex_destroy