Stream: git-wasmtime

Topic: wasmtime / issue #11334 Cranelift interpreter does not re...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 28 2025 at 18:09):

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 +NaN which is the correct result of this function due to the enable_nan_canonicalization flag being enabled.

Currently the interpreter, neither with test interpret nor during fuzzing, does not respect NaN canonicalization meaning it's producing false positives in differential fuzzing.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 28 2025 at 18:09):

alexcrichton added the fuzz-bug label to Issue #11334.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 28 2025 at 18:09):

alexcrichton added the cranelift:area:interpreter label to Issue #11334.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 28 2025 at 18:28):

bjorn3 commented on issue #11334:

Nan canonicalization is done by Context::optimize. The interpret clif-tools command doesn't run Context::optimize before 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