llvm-project/compiler-rt/test/tsan/thread_end_with_ignore.cpp
Dmitry Vyukov b332134921 tsan: new runtime (v3)
This change switches tsan to the new runtime which features:
 - 2x smaller shadow memory (2x of app memory)
 - faster fully vectorized race detection
 - small fixed-size vector clocks (512b)
 - fast vectorized vector clock operations
 - unlimited number of alive threads/goroutimes

Depends on D112602.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D112603
2021-12-13 12:48:34 +01:00

25 lines
596 B
C++

// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
// ReportIgnoresEnabled is disabled on Darwin, see comment in tsan_rtl_thread.cpp.
// UNSUPPORTED: darwin
#include "test.h"
void *Thread(void *x) {
AnnotateIgnoreReadsBegin("", 0);
return 0;
}
int main() {
pthread_t t;
pthread_create(&t, 0, Thread, 0);
pthread_join(t, 0);
}
// CHECK: ThreadSanitizer: thread T1 finished with ignores enabled, created at:
// CHECK: #0 pthread_create
// CHECK: #1 main
// CHECK: Ignore was enabled at:
// CHECK: #0 AnnotateIgnoreReadsBegin
// CHECK: #1 Thread