TerrorJack opened issue #8446:
Reproducer: https://files.catbox.moe/jbsi1b.wasm
When
wasmtime-cli-v20.0.0is built withwinchon x86_64-linux and the above file is run withwasmtime run -C compiler=winch --env PWD=/ --dir "$PWD"::/ -W tail-call -- hello.wasm, then it fails with a segmentation fault. Remove-C compiler=winchand it properly runs without any issue. The module above does not contain any opcodes unsupported by winch at this time.
saulecabrera added the winch label to Issue #8446.
saulecabrera added the bug label to Issue #8446.
saulecabrera commented on issue #8446:
Thanks for the report!
A couple of questions that might help diagnose the root cause:
- The Wasm binary is ~25MB in size, have you tried reducing the failure with
wasm-tools shrinkas outlined here https://github.com/bytecodealliance/wasmtime/blob/main/docs/contributing-reducing-test-cases.md?- Does the Wasm program need access to the current working directory? (e.g. the command in the report is making use of
--dir) If so, could you speak a bit more about what are the expectations between the program and that directory? This might make it easier to reduce the program and reproduce the bug in isolation. FWIW, I tried on a Linux machine, without the--envand without the--dirarguments and I get the following result:main = putStrLn "hello world"
saulecabrera commented on issue #8446:
I was able to reproduce, only when the
--env,--dirand-W tail-callparams are specified (i.e. when-W tail-callis dropped, it doesn't segfault), which makes me think that it has to do with the tail call calling convention and its support in Winch.
saulecabrera commented on issue #8446:
FYI, I've opened https://github.com/bytecodealliance/wasmtime/pull/8447, to address this issue.
alexcrichton closed issue #8446:
Reproducer: https://files.catbox.moe/jbsi1b.wasm
When
wasmtime-cli-v20.0.0is built withwinchon x86_64-linux and the above file is run withwasmtime run -C compiler=winch --env PWD=/ --dir "$PWD"::/ -W tail-call -- hello.wasm, then it fails with a segmentation fault. Remove-C compiler=winchand it properly runs without any issue. The module above does not contain any opcodes unsupported by winch at this time.
Last updated: Dec 13 2025 at 19:03 UTC