Skip to content

Commit 67494c8

Browse files
authored
Canonicalize NaN in cranelift-fuzzgen (#10588)
Lacking this has happened to work fine up to now but Rust nightly is changing float implementations which is changing float payloads. As a result this is the only reliable method of ensuring that differential fuzzing between the interpreter and native backends remains reliable, in the same manner as this being enabled for core wasm as well. Closes #10583
1 parent 0ac3e1e commit 67494c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cranelift/fuzzgen/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ where
254254
// into compilation anywhere, we leave it on unconditionally to make sure the generation doesn't panic.
255255
builder.enable("machine_code_cfg_info")?;
256256

257+
// Differential fuzzing between the interpreter and the host will only
258+
// really work if NaN payloads are canonicalized, so enable this.
259+
builder.enable("cranelift_nan_canonicalization")?;
260+
257261
Ok(Flags::new(builder))
258262
}
259263

0 commit comments

Comments
 (0)