alexcrichton opened PR #12909 from alexcrichton:winch-memory-atomic-overflow to bytecodealliance:main:
This commit fixes a spec-compliance issue with
memory.atomic.*instructions using the Winch compiler. Specifically Winch previously added the dynamic offset to the static offset when calculating the effective address of the operation, but this addition was allowed to overflow. This meant that an operation which should trap would continue instead. The fix here is to use checked arithmetic at runtime to ensure that the address computation does not overflow.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #12909.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #12909.
alexcrichton requested wasmtime-core-reviewers for a review on PR #12909.
alexcrichton updated PR #12909.
github-actions[bot] added the label winch on PR #12909.
github-actions[bot] commented on PR #12909:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
saulecabrera submitted PR review:
Thanks!
saulecabrera added PR #12909 winch: Fix memory.atomic.* with overflowing offsets to the merge queue.
saulecabrera merged PR #12909.
saulecabrera removed PR #12909 winch: Fix memory.atomic.* with overflowing offsets from the merge queue.
Last updated: Apr 12 2026 at 23:10 UTC