alexcrichton opened PR #15240 from alexcrichton:fix-shadow-memory-growth to bytecodealliance:main:
This commit fixes a possible issue with shadow memories and watchpoints where while both memories are validated up-front to be able to satisfy the allocation request it's still possible for the OS to deny growth of one but not the other. This fixes a situation where the main linear memory was able to grow but the shadow memory failed growth. The fix here is to shuffle around growth for the shadow memory, growing it first, so the updates after the main linear memory is infallible.
<!--
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 review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton removed the review request for wasmtime-core-reviewers from PR #15240.
alexcrichton requested dicej for a review on PR #15240.
alexcrichton requested wasmtime-core-reviewers for a review on PR #15240.
github-actions[bot] added the label wasmtime:api on PR #15240.
:thumbs_up: dicej submitted PR review.
:speech_balloon: dicej created PR review comment:
/// least ready to grow but the extra accessible bytes are harmless.
alexcrichton updated PR #15240.
alexcrichton has enabled auto merge for PR #15240.
alexcrichton added PR #15240 Fix shadow memory inconsistency on allocation failure to the merge queue.
:check: alexcrichton merged PR #15240.
alexcrichton removed PR #15240 Fix shadow memory inconsistency on allocation failure from the merge queue.
:thumbs_up: cfallin submitted PR review:
Thanks for the fix and sorry for the delayed review!
Last updated: Nov 19 2026 at 20:05 UTC