-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm2wat needed_dynlibs error #1429
Comments
Looks like it is trying to read the |
Thanks, I'll take a look. |
Hmm, what version of llvm was used to compile that file? It looks like that I added the extrea leb to that section back in https://reviews.llvm.org/D55613, which I think means it was in llvm 8 and above. My guess is that other validators ignore this section completely, and I guess maybe(?) wasm-validate should too? |
Also, I don't think |
Unfortunately we don't have the script that we used to generate the file, so we can't know for sure. It could be that was the rustc version we were using was using llvm-7? |
Yes I think wasm-ld from llvm 7 would produce such a dylink section, but even then only if linked as a shared library with Either way we should re-visit how we validate this custom section. |
While working on an issue in Wasmer, we realized that wabt was unable to parse/validate a valid Wasm file, failing with a
needed_dynlibs
error (my local wabt was installed via homebrew).$ wasm2wat lib/c-api/tests/assets/hello_wasm.wasm 0000018: error: unable to read u32 leb128: needed_dynlibs
$ wasm-validate lib/c-api/tests/assets/hello_wasm.wasm 0000018: error: unable to read u32 leb128: needed_dynlibs
The
hello_wasm.wasm
file seem to be valid according to other validators, so we have no insight of what might be causing the parsing/validating error.For debugging: the wasm file was generated using rustc with
wasm32-unknown-unknown
target for this source:https://github.com/wasmerio/wasmer/blob/master/lib/runtime-c-api/tests/assets/return_hello.rs
The text was updated successfully, but these errors were encountered: