bytecodealliance / bytecodealliance/wasmtime
Cranelift interpreter does not respect nan canonicalization setting
Open
cranelift:area:interpreter
fuzz-bug
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.