Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Asyncify "OOM" leaves broken state

Open
#3,839 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by tracing the emitted Asyncify unwind/rewind mechanisms and the existing bound checks at points such as asyncify_stop_unwind. Verify how much local storage is required before unwinding, then confirm that an out-of-bounds condition is handled before locals are stored and that the module remains usable after the original error is caught.

Written by the indexing model from the issue text.

Description

Right now, emitted Asyncify unwind/rewind mechanisms always stores all the variables while unwinding, and only performs bound checks in points like asyncify_stop_unwind when memory outside of bounds is already corrupted.

This leaves module in a broken state: even if you catch & handle the original error, calling into other exports after this point can result in all sorts of broken behaviour.

A better solution would be to perform bound checks right before storing the locals - their size is known in advance, so such condition should be fairly simple and wouldn't add any noticeable overhead, but would improve reliability a lot.

cc @kripken thoughts?

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
2d 4h
Merged PRs (30d)
77

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 WebAssembly/binaryen

All issues in WebAssembly/binaryen

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.