[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / hwasan_symbolize_stack_uas.cpp
blob6a7d2e9228e639326129f911ea9be86e9389c7e1
1 // RUN: rm -rf %t; mkdir %t
2 // RUN: %clang_hwasan -Wl,--build-id -g %s -o %t/hwasan_uas
3 // RUN: %env_hwasan_opts=symbolize=0 not %run %t/hwasan_uas 2>&1 | hwasan_symbolize --symbols %t --index | FileCheck %s
5 // This doesn't work on X86, because that uses instrument-with-calls which
6 // disables frame records.
7 // REQUIRES: aarch64-target-arch
9 #include <sanitizer/hwasan_interface.h>
10 #include <stdlib.h>
12 static volatile char sink;
14 int main(int argc, char **argv) {
15 volatile char *y;
17 volatile char x[10];
18 y = &x[0];
20 sink = *y;
21 // CHECK: Potentially referenced stack object:
22 // CHECK: 0 bytes inside a variable "x" in stack frame of function "main"
23 // CHECK: at {{.*}}hwasan_symbolize_stack_uas.cpp:[[@LINE-6]]
24 return 0;