Skip to content

Commit 6f5b3e0

Browse files
committed
tests/ui/sanitizer/hwaddress.rs: Run on aarch64 and remove cgu hack
To avoid linker errors like relocation truncated to fit: R_AARCH64_ADR_PREL_PG_HI21 against `.data.rel.ro..L.hwasan' we need to have `-C target-feature=+tagged-globals`, which is documented here: https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html#hwaddresssanitizer
1 parent 4f08307 commit 6f5b3e0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tests/ui/sanitizer/hwaddress.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
//@ needs-sanitizer-support
22
//@ needs-sanitizer-hwaddress
33
//
4-
// FIXME(#83706): this test triggers errors on aarch64-gnu
5-
//@ ignore-aarch64-unknown-linux-gnu
6-
//
7-
// FIXME(#83989): codegen-units=1 triggers linker errors on aarch64-gnu
8-
//@ compile-flags: -Z sanitizer=hwaddress -O -g -C codegen-units=16 -C unsafe-allow-abi-mismatch=sanitizer
4+
//@ compile-flags: -Z sanitizer=hwaddress -O -g -C target-feature=+tagged-globals -C unsafe-allow-abi-mismatch=sanitizer
95
//
106
//@ run-fail
117
//@ error-pattern: HWAddressSanitizer: tag-mismatch
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
warning: unknown and unstable feature specified for `-Ctarget-feature`: `tagged-globals`
2+
|
3+
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
4+
= help: consider filing a feature request
5+
6+
warning: 1 warning emitted

0 commit comments

Comments
 (0)