WebAssembly / WebAssembly/threads

Misalignment checks

Open
#123 9 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

According to the current overview for the threads proposal, misaligned atomic accesses trap (here), while regular, misaligned memory accesses still don't trap.

From the research I've done, it looks like using cpu-exceptions to support trapping just for misaligned atomic operations is a no go for several reasons (lack of os support, overhead, etc). Are we intended to emit a branch to check if the pointer is aligned?

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 proposals/threads/Overview.md#alignment and the issue's discussion of cpu-exceptions. Determine whether misaligned atomic accesses require an explicit alignment check, and document the agreed proposal-level behavior; no test or implementation file is named in the issue.

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
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.