You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
481 B
20 lines
481 B
// RUN: %clang_tsan -O1 %s -o %t && %env_tsan_opts=suppressions='%s.supp' %run %t 2>&1 | FileCheck %s
|
|
#include "test.h"
|
|
|
|
void __attribute__((noinline)) suppress_this(pthread_mutex_t *mu) {
|
|
pthread_mutex_destroy(mu);
|
|
}
|
|
|
|
int main() {
|
|
pthread_mutex_t mu;
|
|
pthread_mutex_init(&mu, 0);
|
|
pthread_mutex_lock(&mu);
|
|
suppress_this(&mu);
|
|
fprintf(stderr, "DONE\n");
|
|
return 0;
|
|
}
|
|
|
|
// CHECK-NOT: failed to open suppressions file
|
|
// CHECK-NOT: WARNING: ThreadSanitizer:
|
|
// CHECK: DONE
|