alexcrichton opened issue #11334:
This test:
test interpret test run set enable_nan_canonicalization=true target x86_64 function %a(f32) -> f32 system_v { block0(v0: f32): v1 = floor v0 return v1 } ; run: %a(-sNaN:0x2f20ff) == -sNaN:0x2f20ff"passes" in the interpreter but "fails" on native. Native produces the result
+NaNwhich is the correct result of this function due to theenable_nan_canonicalizationflag being enabled.Currently the interpreter, neither with
test interpretnor during fuzzing, does not respect NaN canonicalization meaning it's producing false positives in differential fuzzing.
alexcrichton added the fuzz-bug label to Issue #11334.
alexcrichton added the cranelift:area:interpreter label to Issue #11334.
bjorn3 commented on issue #11334:
Nan canonicalization is done by
Context::optimize. The interpret clif-tools command doesn't runContext::optimizebefore interpreting the function: https://github.com/bytecodealliance/wasmtime/blob/ae25a92f49154d4d1f4109d09db03b95d3fd778c/cranelift/src/interpret.rs#L117 Legalizations won't run because of this either.
Last updated: Dec 06 2025 at 07:03 UTC