1 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
3 #include <sanitizer/tsan_interface.h>
11 void OnPotentiallyBlockingRegionBegin() {
12 printf("Enter __cxa_guard_acquire\n");
18 void OnPotentiallyBlockingRegionEnd() { printf("Exit __cxa_guard_acquire\n"); }
22 int main(int argc
, char **argv
) {
24 printf("Enter main\n");
25 // CHECK-NEXT: Enter __cxa_guard_acquire
26 // CHECK-NEXT: Exit __cxa_guard_acquire
29 // CHECK-NEXT: Exit main
30 printf("Exit main\n");