LLVM-compiled Wasm code produces incorrect result #2143
Labels
bug
Something isn't working
🏆 fuzzer-trophy
Bugs found automatically by fuzzers.
📦 lib-compiler-llvm
About wasmer-compiler-llvm
Describe the bug
Using the llvm compiler can result in a mis-compiled module that produces the wrong result.
The above Wasm code when compiled and run using LLVM will produce -1, when the expected answer is 235. When the code is compiled and run using Cranelift, the output is as expected.
Steps to reproduce
wasmer_bug.zip
cargo run ./src/wasmer_bug_minimal.wasm
Expected behavior
That both the Cranelift-compiled and LLVM-compiled Wasm modules produce the same output.
Actual behavior
The LLVM-compiled module produces -1 as its output, while the Cranelift-compiled module produces 235.
Additional context
None.
The text was updated successfully, but these errors were encountered: