fitzgen opened PR #15320 from fitzgen:main-backport-311470f1b7 to bytecodealliance:main:
This commit is an adjustment of the logic to grow an mmap-backed linear memory. Specifically when a memory cannot move and when the memory reservation is not page-size-aligned this means that memories may not grow to their full extent. This is required because bounds-checks assume that bytes beyond the
memory_reservationtunable are all inaccessible in this scenario, but whenmemory_reservationis not page-size-aligned the actual capacity is beyondmemory_reservation.The fix here is to, in some situations that match what compiled code expects, to clamp the size of growth a bit more aggressively and disallow growth in situations that the compile code isn't expecting.
<!--
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
-->
fitzgen removed the review request for wasmtime-core-reviewers from PR #15320.
fitzgen requested wasmtime-core-reviewers for a review on PR #15320.
fitzgen requested pchickey for a review on PR #15320.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton has enabled auto merge for PR #15320.
alexcrichton added PR #15320 Prevent memory growth when reservation disallows to the merge queue.
:check: alexcrichton merged PR #15320.
alexcrichton removed PR #15320 Prevent memory growth when reservation disallows from the merge queue.
Last updated: Nov 19 2026 at 20:05 UTC