llvm-project
23 строки · 596.0 Байт
1// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
2
3// ReportIgnoresEnabled is disabled on Darwin, see comment in tsan_rtl_thread.cpp.
4// UNSUPPORTED: darwin
5#include "test.h"
6
7void *Thread(void *x) {
8AnnotateIgnoreReadsBegin("", 0);
9return 0;
10}
11
12int main() {
13pthread_t t;
14pthread_create(&t, 0, Thread, 0);
15pthread_join(t, 0);
16}
17
18// CHECK: ThreadSanitizer: thread T1 finished with ignores enabled, created at:
19// CHECK: #0 pthread_create
20// CHECK: #1 main
21// CHECK: Ignore was enabled at:
22// CHECK: #0 AnnotateIgnoreReadsBegin
23// CHECK: #1 Thread
24
25