[PATCH] D127544: Add no_sanitize('hwaddress') (and 'memtag', but that's a no-op).
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 16 04:40:39 PDT 2022
aaron.ballman added a comment.
Btw, precommit CI caught a failure:
FAIL: Clang :: CodeGen/hwasan-globals.cpp (4495 of 15547)
******************** TEST 'Clang :: CodeGen/hwasan-globals.cpp' FAILED ********************
Script:
--
: 'RUN: at line 1'; echo "int extra_global;" > C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.extra-source.cpp
: 'RUN: at line 2'; echo "global:*ignorelisted_global*" > C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.ignorelist
: 'RUN: at line 3'; c:\ws\w3\llvm-project\premerge-checks\build\bin\clang.exe -cc1 -internal-isystem c:\ws\w3\llvm-project\premerge-checks\build\lib\clang\15.0.0\include -nostdsysteminc -include C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.extra-source.cpp -fsanitize=hwaddress -fsanitize-ignorelist=C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.ignorelist -emit-llvm -o - C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp | c:\ws\w3\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp --check-prefixes=CHECK
: 'RUN: at line 5'; echo "src:C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp" | sed -e 's/\\/\\\\/g' > C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.ignorelist-src
: 'RUN: at line 6'; c:\ws\w3\llvm-project\premerge-checks\build\bin\clang.exe -cc1 -internal-isystem c:\ws\w3\llvm-project\premerge-checks\build\lib\clang\15.0.0\include -nostdsysteminc -include C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.extra-source.cpp -fsanitize=hwaddress -fsanitize-ignorelist=C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.ignorelist-src -emit-llvm -o - C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp | c:\ws\w3\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp --check-prefix=IGNORELIST
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "echo" "int extra_global;"
$ ":" "RUN: at line 2"
$ "echo" "global:*ignorelisted_global*"
$ ":" "RUN: at line 3"
$ "c:\ws\w3\llvm-project\premerge-checks\build\bin\clang.exe" "-cc1" "-internal-isystem" "c:\ws\w3\llvm-project\premerge-checks\build\lib\clang\15.0.0\include" "-nostdsysteminc" "-include" "C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.extra-source.cpp" "-fsanitize=hwaddress" "-fsanitize-ignorelist=C:\ws\w3\llvm-project\premerge-checks\build\tools\clang\test\CodeGen\Output\hwasan-globals.cpp.tmp.ignorelist" "-emit-llvm" "-o" "-" "C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp"
$ "c:\ws\w3\llvm-project\premerge-checks\build\bin\filecheck.exe" "C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp" "--check-prefixes=CHECK"
# command stderr:
C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp:21:11: error: CHECK: expected string not found in input
// CHECK: @{{.*}}extra_global{{.*}}.hwasan =
^
<stdin>:10:77: note: scanning from here
@"?ignorelisted_global@@3HA" = dso_local global i32 0, no_sanitize_hwaddress, align 4
^
<stdin>:17:1: note: possible intended match here
@"?extra_global@@3HA.hwasan" = private global { i32, [12 x i8] } { i32 0, [12 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\01" }, align 16
^
Input file: <stdin>
Check file: C:\ws\w3\llvm-project\premerge-checks\clang\test\CodeGen\hwasan-globals.cpp
-dump-input=help explains the following input dump.
Input was:
<<<<<<
.
.
.
5:
6: $hwasan.module_ctor = comdat any
7:
8: @"?attributed_global@@3HA" = dso_local global i32 0, no_sanitize_hwaddress, align 4
9: @"?disable_instrumentation_global@@3HA" = dso_local global i32 0, no_sanitize_hwaddress, align 4
10: @"?ignorelisted_global@@3HA" = dso_local global i32 0, no_sanitize_hwaddress, align 4
check:21'0 X~~~~~~~~~ error: no match found
11: @llvm.used = appending global [1 x ptr] [ptr @hwasan.module_ctor], section "llvm.metadata"
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @hwasan.module_ctor, ptr @hwasan.module_ctor }]
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13: @__start_hwasan_globals = external hidden constant [0 x i8]
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14: @__stop_hwasan_globals = external hidden constant [0 x i8]
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15: @hwasan.note = private constant { i32, i32, i32, [8 x i8], i32, i32 } { i32 8, i32 8, i32 3, [8 x i8] c"LLVM\00\00\00\00", i32 trunc (i64 sub (i64 ptrtoint (ptr @__start_hwasan_globals to i64), i64 ptrtoint (ptr @hwasan.note to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @__stop_hwasan_globals to i64), i64 ptrtoint (ptr @hwasan.note to i64)) to i32) }, section ".note.hwasan.globals", comdat($hwasan.module_ctor), align 4
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16: @hwasan.dummy.global = private constant [0 x i8] zeroinitializer, section "hwasan_globals", comdat($hwasan.module_ctor), !associated !0
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17: @"?extra_global@@3HA.hwasan" = private global { i32, [12 x i8] } { i32 0, [12 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\01" }, align 16
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:21'1 ? possible intended match
18: @"?extra_global@@3HA.hwasan.descriptor" = private constant { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (ptr @"?extra_global@@3HA.hwasan" to i64), i64 ptrtoint (ptr @"?extra_global@@3HA.hwasan.descriptor" to i64)) to i32), i32 16777220 }, section "hwasan_globals", !associated !1
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19: @"?global@@3HA.hwasan" = private global { i32, [12 x i8] } { i32 0, [12 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\02" }, align 16
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20: @"?global@@3HA.hwasan.descriptor" = private constant { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (ptr @"?global@@3HA.hwasan" to i64), i64 ptrtoint (ptr @"?global@@3HA.hwasan.descriptor" to i64)) to i32), i32 33554436 }, section "hwasan_globals", !associated !2
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21: @"?static_var@?1??func@@YAXXZ at 4HA.hwasan" = private global { i32, [12 x i8] } { i32 0, [12 x i8] c"\00\00\00\00\00\00\00\00\00\00\00\03" }, align 16
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22: @"?static_var@?1??func@@YAXXZ at 4HA.hwasan.descriptor" = private constant { i32, i32 } { i32 trunc (i64 sub (i64 ptrtoint (ptr @"?static_var@?1??func@@YAXXZ at 4HA.hwasan" to i64), i64 ptrtoint (ptr @"?static_var@?1??func@@YAXXZ at 4HA.hwasan.descriptor" to i64)) to i32), i32 50331652 }, section "hwasan_globals", !associated !3
check:21'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
.
.
>>>>>>
error: command failed with exit status: 1
--
********************
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127544/new/
https://reviews.llvm.org/D127544
More information about the cfe-commits
mailing list