1 // RUN: %clang_hwasan %s -o %t && %env_hwasan_opts=random_tags=1 %run %t
4 #include <sanitizer/hwasan_interface.h>
9 void *ThreadFn(void *) {
11 __hwasan_enable_allocator_tagging();
12 // This will trigger memory deallocation in __strerror_thread_freeres,
13 // at a point when HwasanThread is already gone.
18 pthread_create(&t
, NULL
, ThreadFn
, NULL
);
19 pthread_join(t
, NULL
);