1 // https://github.com/google/sanitizers/issues/925
2 // RUN: %clang_hwasan -O0 %s -o %t && %run %t 2>&1
4 // REQUIRES: aarch64-target-arch || x86_64-target-arch || riscv64-target-arch
5 // REQUIRES: pointer-tagging
12 #include <sanitizer/hwasan_interface.h>
14 __attribute__((noinline
, no_sanitize("hwaddress"))) void child() {
16 __hwasan_tag_memory(x
, 0xAA, sizeof(x
));
20 __attribute__((noinline
, no_sanitize("hwaddress"))) void parent() {
22 __hwasan_print_shadow(&x
, sizeof(x
));
23 assert(__hwasan_test_shadow(x
, sizeof(x
)) == -1);
26 int main(int argc
, char **argv
) {