WebAssembly / WebAssembly/wabt

wasm2wat needed_dynlibs error

Open
#1,429 6 comments 0 reactions 1 assignee View on GitHub

@sbc100 is already working on this.

Since May 18, 2020.

Dominant language
C++
Stars
8.1k
Forks
827
Avg merge
4d 6h
Merged PRs (30d)
18

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.