1 // RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s
17 void *Thread(void *x
) {
18 barrier_wait(&barrier
);
24 barrier_init(&barrier
, 2);
27 pthread_create(&t
, 0, Thread
, obj
);
29 barrier_wait(&barrier
);
33 // CHECK: WARNING: ThreadSanitizer: heap-use-after-free (virtual call vs free)