[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / strip_path_prefix.c
blob22705ed35ce7e9da61dbad47a9586b04a7d88292
1 // RUN: %clang_hwasan -O0 -g %s -o %t && %env_hwasan_opts=strip_path_prefix=/TestCases/ not %run %t 2>&1 | FileCheck %s
3 // Stack histories currently are not recorded on x86.
4 // XFAIL: target=x86_64{{.*}}
6 #include <assert.h>
7 #include <sanitizer/hwasan_interface.h>
8 #include <stdio.h>
10 int t;
12 __attribute__((noinline)) char *buggy() {
13 char *volatile p;
14 char zzz = {};
15 char yyy = {};
16 p = t ? &yyy : &zzz;
17 return p;
20 int main() {
21 char *p = buggy();
22 return *p;
23 // CHECK: READ of size 1 at
24 // CHECK: #0 {{.*}} in main strip_path_prefix.c:[[@LINE-2]]
25 // CHECK: Potentially referenced stack objects:
26 // CHECK: in buggy strip_path_prefix.c:[[@LINE-12]]