1 // RUN: %clang_hwasan -O0 -g %s -o %t && not %run %t 2>&1 | FileCheck %s
2 // RUN: %clang_hwasan -O3 -g %s -o %t && not %run %t 2>&1 | FileCheck %s
4 // Stack histories currently are not recorded on x86.
5 // XFAIL: target=x86_64{{.*}}
7 __attribute((noinline
)) void buggy() {
15 // CHECK: WRITE of size 1 at
16 // CHECK: #0 {{.*}} in buggy{{.*}}stack-overflow.c:[[@LINE-6]]
17 // CHECK: Cause: stack tag-mismatch
18 // CHECK: is located in stack of thread
19 // CHECK: Potentially referenced stack objects:
20 // CHECK: Cause: stack-buffer-overflow
21 // CHECK-NEXT: 0x{{.*}} is located 1 bytes after a 64-byte local variable c [0x{{.*}},0x{{.*}}) in buggy {{.*}}stack-overflow.c:
22 // CHECK: Memory tags around the buggy address
24 // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in buggy