Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / stack-underflow.c
blobe13955ed37b4100828cb521a803a987c2a9ef537
1 // RUN: %clang_hwasan -g %s -o %t && not %run %t 2>&1 | FileCheck %s
3 // Stack histories currently are not recorded on x86.
4 // XFAIL: target=x86_64{{.*}}
6 __attribute((noinline)) void buggy() {
7 char c[64];
8 char *volatile p = c;
9 p[-2] = 0;
12 int main() {
13 buggy();
14 // CHECK: WRITE of size 1 at
15 // CHECK: #0 {{.*}} in buggy{{.*}}stack-underflow.c:[[@LINE-6]]
16 // CHECK: Cause: stack tag-mismatch
17 // CHECK: is located in stack of thread
18 // CHECK: Potentially referenced stack objects:
19 // CHECK: Cause: stack-buffer-overflow
20 // CHECK-NEXT: 0x{{.*}} is located 2 bytes before a 64-byte local variable c [0x{{.*}},0x{{.*}}) in buggy {{.*}}stack-underflow.c:
21 // CHECK: Memory tags around the buggy address
23 // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in buggy