- the loader build id (the JIT cache key) comes from the linked binary: on macOS a hash of the code signature's page hashes, on Linux the GNU build id; a stripped or re-linked binary gets a new id, at no startup cost - tools/run/fixture/diff_fast.sh runs a set of programs under makepad run at baseline and O3 and compares them with rustc (about 5 s); diff_full.sh adds the compiler test corpus and a Calculator input replay on Linux Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
750 B
Rust
16 lines
750 B
Rust
// KNOWN FAILING (baseline tier): the payload message of an integer division by zero is "explicit panic" under
|
|
// Relax, rustc says "attempt to divide by zero". Found by diff_fast 2026-10-20. Move to ../diff/ when fixed.
|
|
macro_rules! d { ($($a:tt)*) => { println!("D {}", format!($($a)*)) } }
|
|
fn rounds(f: fn()) {
|
|
let ms: u64 = std::env::var("DIFF_SLEEP_MS").ok().and_then(|v| v.parse().ok()).unwrap_or(0);
|
|
for r in 0..4 { f(); if r < 3 && ms > 0 { std::thread::sleep(std::time::Duration::from_millis(ms)); } }
|
|
}
|
|
#[test]
|
|
fn run() { rounds(work); }
|
|
|
|
|
|
fn work() {
|
|
let r = std::panic::catch_unwind(|| { let d = std::hint::black_box(0); 10 / d });
|
|
let e = r.unwrap_err();
|
|
d!("{}", e.downcast_ref::<&str>().copied().unwrap_or("?"));
|
|
}
|