Skip to content

[test] Fix shared memory flag check in WasmModuleBuilder#256

Open
backes wants to merge 1 commit into
WebAssembly:mainfrom
backes:fix-wasm-module-builder-shared-check
Open

[test] Fix shared memory flag check in WasmModuleBuilder#256
backes wants to merge 1 commit into
WebAssembly:mainfrom
backes:fix-wasm-module-builder-shared-check

Conversation

@backes

@backes backes commented Jun 15, 2026

Copy link
Copy Markdown
Member

Using wasm.memory.shared !== undefined incorrectly treats shared: false as shared. This changes it to use a boolean cast.

This also matches the upstream V8 version of the module builder: https://source.chromium.org/chromium/chromium/src/+/main:v8/test/mjsunit/wasm/wasm-module-builder.js;l=2264;drc=4a369267cbda6cb3dc9858f90eb8dd9b61317111

This makes a test added in #250 actually pass.

Using 'wasm.memory.shared !== undefined' incorrectly treats
'shared: false' as shared. This changes it to use a boolean cast.

This also matches the upstream V8 version of the module builder:
https://source.chromium.org/chromium/chromium/src/+/main:v8/test/mjsunit/wasm/wasm-module-builder.js;l=2264;drc=4a369267cbda6cb3dc9858f90eb8dd9b61317111

This makes a test added in WebAssembly#250 actually pass.
hubot pushed a commit to v8/v8 that referenced this pull request Jun 15, 2026
- Passing tests removed from FAIL list:
  exception/constructor.tentative
  wpt/exception/constructor.tentative
- New failures added to FAIL list:
  wpt/esm-integration/source-phase-string-constants.tentative
  wpt/esm-integration/string-constants.tentative
  proposals/threads/memory/wait-notify-unshared

Opened WebAssembly/threads#256 for the failure
in `proposals/threads/memory/wait-notify-unshared`.

R=mliedtke@chromium.org

Bug: 384676197
Change-Id: I0f52aa92cf8f381ee7b6e45f5a89db549a8563eb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7941572
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Cr-Commit-Position: refs/heads/main@{#107982}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant