diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2024-04-14 16:39:08 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2024-04-16 21:13:21 -0400 |
| commit | 9ab6e36d8d1cad691a9078921a8ce07de5d4de02 (patch) | |
| tree | 5500c32e9d789a6144e70dfa9812e4217468aaea | |
| parent | 649e80184bf238760a2162c6f93090c4ed6abae8 (diff) | |
| download | rust-9ab6e36d8d1cad691a9078921a8ce07de5d4de02.tar.gz rust-9ab6e36d8d1cad691a9078921a8ce07de5d4de02.zip | |
Fix broken test
Testing for ASLR by casting &ZST to *const _ is not useful, there's no guarantee that &ZST produces an ASLR'd pointer.
| -rw-r--r-- | tests/run-make/static-pie/test-aslr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/run-make/static-pie/test-aslr.rs b/tests/run-make/static-pie/test-aslr.rs index 96b17af46df..8d8e7586323 100644 --- a/tests/run-make/static-pie/test-aslr.rs +++ b/tests/run-make/static-pie/test-aslr.rs @@ -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); |
