1 // RUN: %clang_hwasan -g %s -o %t && not %run %t 2>&1 | FileCheck %s
2 
3 // Dynamic stack realignment causes debug info locations to use non-FP-relative
4 // offsets because stack frames are realigned below FP, which means that we
5 // can't associate addresses with stack objects in this case. Ideally we should
6 // be able to handle this case somehow (e.g. by using a different register for
7 // DW_AT_frame_base) but at least we shouldn't get confused by it.
8 
9 __attribute((noinline))
buggy()10 char *buggy() {
11   _Alignas(64) char c[64];
12   char *volatile p = c;
13   return p;
14 }
15 
main()16 int main() {
17   char *p = buggy();
18   // CHECK-NOT: Potentially referenced stack objects:
19   p[0] = 0;
20 }
21