[docs] Fix build-docs.sh
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / stack-uar-dynamic.c
blob57426f1e6613288c4f0f1d75ce60ecd2f393766e
1 // RUN: %clang_hwasan -g %s -o %t && not %run %t 2>&1 | FileCheck %s
3 // Dynamic allocation of stack objects does not affect FP, so the backend should
4 // still be using FP-relative debug info locations that we can use to find stack
5 // objects.
7 // Stack histories are currently not recorded on x86.
8 // XFAIL: x86_64
10 __attribute((noinline))
11 char *buggy(int b) {
12 char c[64];
13 char *volatile p = c;
14 if (b) {
15 p = __builtin_alloca(64);
16 p = c;
18 return p;
21 int main() {
22 char *p = buggy(1);
23 // CHECK: Potentially referenced stack objects:
24 // CHECK-NEXT: c in buggy
25 p[0] = 0;