saulecabrera opened PR #13337 from saulecabrera:winch-issue-13327 to bytecodealliance:main:
Prior to this commit, the alignment check implementation part of the threads proposal was erroneously relying on the byte access size to calcuate the effective address, this would result in a panic at Cranelift's emission layer when mixing immediates and access sizes smaller than 4-bytes.
The fix relies on the heap size for the arithmetic operations related to calculating the effective address and alignment calculation, mirroring what the heap address calculation will use prior to a memory access.
<!--
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
-->
saulecabrera requested uweigand for a review on PR #13337.
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #13337.
saulecabrera requested pchickey for a review on PR #13337.
saulecabrera requested wasmtime-core-reviewers for a review on PR #13337.
saulecabrera commented on PR #13337:
Fixes https://github.com/bytecodealliance/wasmtime/issues/13327
:thumbs_up: alexcrichton submitted PR review:
Thanks!
alexcrichton added PR #13337 winch(x64): Ensure correct operand size on memory alignment check to the merge queue.
:check: alexcrichton merged PR #13337.
alexcrichton removed PR #13337 winch(x64): Ensure correct operand size on memory alignment check from the merge queue.
Last updated: Jun 01 2026 at 09:49 UTC