WebAssembly / WebAssembly/spec

[wasm-js-api-2] js-api Memory.grow requirement cannot be fulfilled via the core specification

Open
#1,635 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
3.5k
Forks
539
Avg merge
2d 1h
Merged PRs (30d)
13

Description

A requirement appearing after Memory.grow(delta) asks the host to execute code after an instruction completes:

Immediately after a WebAssembly memory.grow instruction executes, perform the following steps:
[...]

There are no notes about this in the core spec, and a correct implementation of the core spec lacks APIs for this sort of hook.
While a hook can be placed in the memory store's grow implementation, this requirement cannot be fulfilled as-is.

For reference, memory.grow does not provide any such hooks.

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 with the wasm-js-api-2 Memory.grow requirement and compare its post-instruction steps with the core specification's memory.grow definition. Review the memory store's grow implementation and the linked core-spec reference to determine where the mismatch is documented. Done means the specifications clearly provide a valid way to account for the required behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.