Skip to content

Fix atomic wait expected values on big-endian hosts - #14027

Open
subotac wants to merge 1 commit into
bytecodealliance:mainfrom
subotac:fix/atomic-wait-big-endian
Open

Fix atomic wait expected values on big-endian hosts#14027
subotac wants to merge 1 commit into
bytecodealliance:mainfrom
subotac:fix/atomic-wait-big-endian

Conversation

@subotac

@subotac subotac commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #13988.

WebAssembly linear memory is little-endian, while the native atomic views used by shared memory follow host endianness. Convert the expected wait32 and wait64 values at that boundary so comparisons use the same byte
representation on big-endian hosts.

Add the issue's wait32/wait64 regression cases and exclude the test from the pooling configuration, which does not support shared memory.

Tests:

  • cargo test --test wast -- atomic_wait_endianness
  • cargo test --test wast -- threads
  • cargo fmt -p wasmtime -p wasmtime-test-util -- --check

@subotac
subotac requested a review from a team as a code owner July 30, 2026 15:55
@subotac
subotac requested review from pchickey and removed request for a team July 30, 2026 15:55
@pchickey
pchickey requested review from alexcrichton and removed request for pchickey July 30, 2026 16:11
@alexcrichton
alexcrichton added this pull request to the merge queue Jul 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 30, 2026
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory.atomic.wait instructions fail to account for big-endian hosts

2 participants