Skip to content

Tinywasm fails to instantiate WASI modules with stubs #46

Description

@Robbepop

In the wasmi-benchmarks repo I tried to setup the startup benchmarks for the tinywasm interpreter.

However, from all the supported Wasm runtimes, it was the only one that failed to actually instantiate any of the WASI modules.
Note that I provided empty stubs for all of the imports and from what I can tell those imports should not be called anywhere during the Wasm module instantiation procedure.

With this setup even Wasm runtimes does explicitly do not support WASI should at least be able to instantiate those WASI modules - without executing them obviously.

Another observation: Wasm modules without a table/element segment (erc20, coremark-minimal, argon2) instantiate fine.

Repro:

  1. Clone wasmi-benchmarks.
  2. Checkout 5973722b68ac3a35268ac252ce8d5594586654a8.
  3. Make can_run return just true to avoid the filters.
  4. Run cargo bench --profile release startup --no-default-features -F tinywasm
  5. See that the above command does not behave properly (does not halt).

Compared to other engines, e.g. cargo bench --profile release startup --no-default-features -F wasmi-v2 where the same startup benchmark works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions