Stream: wasmtime

Topic: ✔ wasm-tools doesn't validate debug wasmtime.wasm


view this post on Zulip Frank Rehwinkel (Jun 22 2024 at 14:55):

Totally not important. Just wanted to mention the 135MB target/wasm32-wasip1/debug/wasmtime.wasm that is built from cargo build --target wasm32-wasip1 --features all-arch,compile --no-default-features fails the wasm-tools validate command.

$ wasm-tools validate target/wasm32-wasip1/debug/wasmtime.wasm
error: func 34969 failed to validate

Caused by:
    0: too many locals: locals exceed maximum (at offset 0x11e3568)

The wasm binary built with --release passes.

view this post on Zulip Pat Hickey (Jun 22 2024 at 15:10):

That’s unfortunately common in large programs built with llvm without optimizations. Does the release build work?

view this post on Zulip Pat Hickey (Jun 22 2024 at 15:12):

The limit on locals (50k) should be consistent across all wasm implementations https://github.com/WebAssembly/spec/issues/607

From the November in-person meeting, we had an action item to reach consensus on implementation-defined limits such as the maximum size of a function or the maximum number of functions in a module....

view this post on Zulip Frank Rehwinkel (Jun 22 2024 at 15:27):

The release build passes validation and that's what I'm playing with, so far with iwasm on a Linux machine. I don't imagine I'll need the debug version as I would hope to not be debugging the compiler. If I ever need it, I'll try to remember this thread and look into passing LLVM flags to the build to reduce things. Thanks.

view this post on Zulip Notification Bot (Jun 22 2024 at 15:27):

Frank Rehwinkel has marked this topic as resolved.


Last updated: Dec 23 2024 at 14:03 UTC