WebAssembly / WebAssembly/binaryen

Asyncify: warn/error when functions match both ADD and REMOVE

Open
#6,482 0 comments 0 reactions 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

Follow on to https://github.com/emscripten-core/emscripten/issues/13150

If a function is explicitly listed in both the add-list and remove-list, that should be an error.

But if there are wildcards, then it's less obvious what to do... For safety reasons, anything matching an ADD should still be added. Except maybe ADD* + REMOVE?

Matching a wildcard on both seems like a clearly ambiguous situation, and so should warn.

If we assume that most people only have issues from Add* + Remove*, then we'd probably want people to resolve the ambiguity by explicitly listing functions. So an explicit Add should just overrule a Remove*, that seems safe, and not worthy of a warning.

Are we okay with making an explicit Remove overrule an Add*? That's the riskiest combination. Instead of ignoring the Add*, we could still warn for such combinations, suggesting people change their Add wildcards to be more specific so they stop matching the Removed function.

And imports should be treated like the add-list, I think.

Add Add * Imports
Remove Error ???? Error
Remove * Ignore Warn Ignore

(This isn't a high priority request. I've used remove* before, but never add*. And I haven't seen anyone else report issues due to the lack of warnings.)

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 tracing Asyncify's matching logic for the add-list, remove-list, wildcards, and imports. Use the decision table in the issue to resolve explicit and wildcard overlaps, then add warnings or errors and tests that cover each listed combination.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.