Skip to content

Fix alignment in relaxed atomics spec test - #8961

Merged
stevenfontanella merged 1 commit into
mainfrom
relaxed-spec-test
Jul 31, 2026
Merged

Fix alignment in relaxed atomics spec test#8961
stevenfontanella merged 1 commit into
mainfrom
relaxed-spec-test

Conversation

@stevenfontanella

@stevenfontanella stevenfontanella commented Jul 31, 2026

Copy link
Copy Markdown
Member

The spec test intends to use the natural alignment for all instructions, but it's choosing an alignment based on the memory address type rather than the size of the load/store. This means that sometimes the alignment is too small (4 bytes for an 8-byte load/store in a 32-bit memory), and sometimes the alignment is too large (8 bytes for a 4-byte load/store in a 64-bit memory) both of which are a validation error (but are not in Binaryen today).

Use the size of the load/store as the alignment instead.

Spec reference:
image

@stevenfontanella
stevenfontanella marked this pull request as ready for review July 31, 2026 22:23
@stevenfontanella
stevenfontanella requested a review from a team as a code owner July 31, 2026 22:23
@stevenfontanella
stevenfontanella requested review from tlively and removed request for a team July 31, 2026 22:23

@tlively tlively left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops!

@stevenfontanella
stevenfontanella enabled auto-merge (squash) July 31, 2026 22:26
@stevenfontanella
stevenfontanella merged commit 33abc59 into main Jul 31, 2026
16 checks passed
@stevenfontanella
stevenfontanella deleted the relaxed-spec-test branch July 31, 2026 22:27
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.

2 participants