Duplicate imports break annotation code generation

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java, wasm
Domain
compilers

Research direction

Start with the WasmModuleInterface code responsible for emitting functions from imports, using the linked Go compiled module with two fd_write imports as the reproduction case. Check how duplicate names are handled and verify that valid duplicate imports no longer produce colliding functions; wasm-opt --duplicate-function-elimination is the current workaround.

Written by the indexing model from the issue text.

Description

In this example, the Go compiled module has 2 imports fd_write.
This is legal Wasm and the engine works great but the WasmModuleInterface breaks as it is emitting two colliding functions in the same class.

Since this is allowed, we need a way to gracefully handle this case.

As a viable workaround, is possible, today to use wasm-opt:

wasm-opt --duplicate-function-elimination
Dominant language
Java
Stars
301
Forks
21
Avg merge
2d 4h
Merged PRs (30d)
34

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.

More from bytecodealliance/endive

All issues in bytecodealliance/endive

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.