[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / stack-overflow.c
blob98d75189e146d056dbe3199fcf2210a308d74bdb
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() {
8 char c[64];
9 char *volatile p = c;
10 p[65] = 0;
13 int main() {
14 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