We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f53a59 commit 389142eCopy full SHA for 389142e
compiler-rt/test/hwasan/TestCases/hwasan_symbolize_stack_uas.cpp
@@ -0,0 +1,22 @@
1
+// RUN: %clang_hwasan -Wl,--build-id -g %s -o %t
2
+// RUN: %env_hwasan_opts=symbolize=0 not %run %t 2>&1 | hwasan_symbolize --symbols $(dirname %t) --index | FileCheck %s
3
+
4
+// REQUIRES: pointer-tagging
5
6
+#include <sanitizer/hwasan_interface.h>
7
+#include <stdlib.h>
8
9
+static volatile char sink;
10
11
+int main(int argc, char **argv) {
12
+ volatile char *y;
13
+ {
14
+ volatile char x[10];
15
+ y = &x[0];
16
+ }
17
+ sink = *y;
18
+ // CHECK: Potentially referenced stack object:
19
+ // CHECK: 0 bytes inside a variable "x" in stack frame of function "main"
20
+ // CHECK: at {{.*}}hwasan_symbolize_stack_uas.cpp:[[@LINE-6]]
21
+ return 0;
22
+}
0 commit comments