Stream: wasi

Topic: wasi-sdk building invalid code


view this post on Zulip bjorn3 (Oct 01 2024 at 14:04):

I tried compiling one of the zlib-rs examples which also compiles zlib-ng for wasm32-wasip1. It compiled, but when I then try to run it in Wasmtime, I get "Invalid input WebAssembly code at offset 109435: type mismatch: values remaining on stack at end of block". What would be an appropriate place to report this bug?

view this post on Zulip fitzgen (he/him) (Oct 01 2024 at 15:12):

maybe start with wasi-sdk and then subsequent investigation can find the right home

do other engines (say browsers) also report the wasm as invalid?

view this post on Zulip bjorn3 (Oct 01 2024 at 15:15):

Node 20.17 reports "CompileError: WebAssembly.compile(): Compiling function #191:"adler32_stub" failed: expected 1 elements on the stack for fallthru, found 3 @+104593"

view this post on Zulip bjorn3 (Oct 01 2024 at 15:31):

https://github.com/WebAssembly/wasi-sdk/issues/492

The blogpost-uncompress example of zlib-rs includes the C libz-ng library. Without libz-ng, zlib-rs compiles fine for wasm. Reproduction $ git clone https://github.com/trifectatechfoundation/zlib-r...

Last updated: Dec 23 2024 at 13:07 UTC