alexcrichton opened PR #14590 from alexcrichton:fix-some-overflow to bytecodealliance:main:
This commit fixes a few possible overflowing additions that can happen during compilation when some tunables are set to extremely high values such as
memory_reservationormemory_guard_size. These are already handled correctly at runtime such that a memory could never actually be instantiated, but the compile-time phase of things has a few additions which would panic in debug mode. It felt best to just disallow this in theConfig-layer of options to avoid having to worry in the runtime about these values overflowing.<!--
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 requested wasmtime-core-reviewers for a review on PR #14590.
alexcrichton requested cfallin for a review on PR #14590.
:thumbs_up: cfallin submitted PR review.
cfallin added PR #14590 Fix some add-with-overflow with memory tunables to the merge queue.
:check: cfallin merged PR #14590.
cfallin removed PR #14590 Fix some add-with-overflow with memory tunables from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC