Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
Testing for ASLR by casting &ZST to *const _ is not useful, there's no
guarantee that &ZST produces an ASLR'd pointer.
  • Loading branch information
Mark-Simulacrum committed Apr 17, 2024
1 parent 649e801 commit 9ab6e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/run-make/static-pie/test-aslr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() {
let arg0 = args.next().unwrap();
match args.next() {
Some(s) if s.eq("--report") => {
println!("main = {:#?}", &main as *const _);
println!("main = {:#?}", main as fn() as usize);
}
Some(s) if s.eq("--test-no-aslr") => {
let cnt = run_self(&arg0);
Expand Down

0 comments on commit 9ab6e36

Please sign in to comment.