1 // RUN: %clang_hwasan -O0 %s -o %t && %run %t 2>&1
3 // REQUIRES: aarch64-target-arch || x86_64-target-arch || riscv64-target-arch
4 // REQUIRES: pointer-tagging
8 #include <sanitizer/hwasan_interface.h>
11 #include <sys/types.h>
17 int main(int argc
, char **argv
) {
18 pthread_atfork(nullptr, nullptr, []() {
26 waitpid(pid
, &wstatus
, 0);
27 } while (!WIFEXITED(wstatus
) && !WIFSIGNALED(wstatus
));
28 if (!WIFEXITED(wstatus
) || WEXITSTATUS(wstatus
)) {
29 fprintf(stderr
, "abnormal exit\n");