WebAssembly / WebAssembly/threads

Should wake trap for out-of-bounds addresses?

Open
#105 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
767
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Imagine that a memory.shrink operation is added, and that a thread waits on an address, then the memory is shrunk so that the address is out of bounds. If wake traps on out-of-bounds addresses (as it is defined to do now), it's not possible to wake the waiting thread without first growing the memory back to include the wait address.

Given that wake doesn't use its address operand to access memory, I think it shouldn't do any bounds checking on 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 reviewing the issue's memory.shrink and wait/wake scenario, then examine the WebAssembly threads proposal rules for wake address bounds checking. Done means reaching and documenting a settled behavior for waking a thread whose wait address is outside the current memory bounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.