1 // RUN: %clangxx_hwasan -DERR=1 %s -o %t && not %run %t 2>&1 | FileCheck %s
2 // RUN: %clangxx_hwasan -DERR=2 %s -o %t && not %run %t 2>&1 | FileCheck %s
8 #include <sanitizer/hwasan_interface.h>
10 __attribute__((no_sanitize("hwaddress")))
11 extern "C" void android_set_abort_message(const char *msg
) {
12 fprintf(stderr
, "== abort message start\n%s\n== abort message end\n", msg
);
16 __hwasan_enable_allocator_tagging();
17 char *volatile p
= (char *)malloc(16);
24 // CHECK: ERROR: HWAddressSanitizer:
25 // CHECK: == abort message start
26 // CHECK: ERROR: HWAddressSanitizer:
27 // CHECK: == abort message end