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.
This commit is contained in:
Mark Rousskov 2024-04-14 16:39:08 -04:00
parent 649e80184b
commit 9ab6e36d8d

View File

@ -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);