alexcrichton opened PR #14355 from alexcrichton:fix-stack-overflow to bytecodealliance:main:
This commit fixes a stack overflow when translating a variant from one component to another when it contains more than 1000 cases. This caused FACT to determine that an outlined helper was necessary but the helper ended up just delegating to itself since it determined that there wasn't ever enough fuel to translate the variant. The fix here is to treat the initial-fuel case as special and always able to translate at least one type to ensure that some translation progress is always made.
Closes #14354
<!--
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 dicej for a review on PR #14355.
alexcrichton requested wasmtime-core-reviewers for a review on PR #14355.
:thumbs_up: dicej submitted PR review.
alexcrichton added PR #14355 Fix stack overflow translating huge variant to the merge queue.
:check: alexcrichton merged PR #14355.
alexcrichton removed PR #14355 Fix stack overflow translating huge variant from the merge queue.
Last updated: Sep 20 2026 at 18:08 UTC