Stream: git-wasmtime

Topic: wasmtime / issue #8446 Winch runtime segmentation fault i...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2024 at 16:42):

TerrorJack opened issue #8446:

Reproducer: https://files.catbox.moe/jbsi1b.wasm

When wasmtime-cli-v20.0.0 is built with winch on x86_64-linux and the above file is run with wasmtime run -C compiler=winch --env PWD=/ --dir "$PWD"::/ -W tail-call -- hello.wasm, then it fails with a segmentation fault. Remove -C compiler=winch and it properly runs without any issue. The module above does not contain any opcodes unsupported by winch at this time.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2024 at 16:46):

saulecabrera added the winch label to Issue #8446.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2024 at 16:46):

saulecabrera added the bug label to Issue #8446.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2024 at 17:15):

saulecabrera commented on issue #8446:

Thanks for the report!

A couple of questions that might help diagnose the root cause:

main = putStrLn "hello world"

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2024 at 17:41):

saulecabrera commented on issue #8446:

I was able to reproduce, only when the --env, --dir and -W tail-call params are specified (i.e. when -W tail-call is 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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2024 at 19:14):

saulecabrera commented on issue #8446:

FYI, I've opened https://github.com/bytecodealliance/wasmtime/pull/8447, to address this issue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2024 at 21:14):

alexcrichton closed issue #8446:

Reproducer: https://files.catbox.moe/jbsi1b.wasm

When wasmtime-cli-v20.0.0 is built with winch on x86_64-linux and the above file is run with wasmtime run -C compiler=winch --env PWD=/ --dir "$PWD"::/ -W tail-call -- hello.wasm, then it fails with a segmentation fault. Remove -C compiler=winch and it properly runs without any issue. The module above does not contain any opcodes unsupported by winch at this time.


Last updated: Oct 23 2024 at 20:03 UTC