Skip to content

Fix error: wasm unreachable instruction executed - #744

Open
paugier wants to merge 2 commits into
spylang:mainfrom
paugier:bug-wasi-diff-abi-link
Open

paugier wants to merge 2 commits into
spylang:mainfrom
paugier:bug-wasi-diff-abi-link

Conversation

@paugier

@paugier paugier commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This is a funny bug:

def mul(a: i64, b: i64) -> tuple[i64, i64]:
    return a * b, a

gives for WASI

E               wasmtime._trap.Trap: error while executing at wasm backtrace:
E                   0:   0x22b0 - test.wasm!signature_mismatch:__multi3
E                   1:  0x21106 - test.wasm!spy_test$mul
E               note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information
E               
E               Caused by:
E                   wasm trap: wasm `unreachable` instruction executed

Claude told me that this is an issue with the flags given to the linker. I don't know if this is the correct fix.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant