WebAssembly / WebAssembly/binaryen

split_wast does not check for unbalanced parens

Open
#3,231 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

@aardappel saw that while splitting a module up, it may ignore stuff at the end, e.g.

(module
 (memory $0 i64 1 1)
 (data (i32.const 0) "\00")) ;; note extra closing paren
 (func $foo)
)

It thinks the module ends at the comment, and the rest is ignored. This can
be confusing when running the test suite or updating it.

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.

Research direction

Start by locating the split_wast entry point and reproduce the issue with the WAT example in this report. The fix is done when extra closing parentheses are detected instead of causing trailing content such as the func declaration to be ignored.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.