dhil opened PR #15110 from dhil:stack-switching-init-checks to bytecodealliance:main:
This patch adds some defense-in-depth measure to prevent the engine from segfaulting due to stack overflow on the initial entry to a high-arity continuation.
The principal idea is to calculate the required headroom for the continuation's persistent control data. I have deliberately opted for a runtime calculation rather than compile-time calculation for simplicity and to keep the changes local to the stack-switching feature. In principle, the result could be attached as metadata to the compiled artifact.
Resolves #13020.
dhil removed the review request for wasmtime-core-reviewers from PR #15110.
dhil requested wasmtime-core-reviewers for a review on PR #15110.
dhil requested pchickey for a review on PR #15110.
dhil added the label wasm-proposal:stack-switching on PR #15110.
dhil updated PR #15110.
github-actions[bot] added the label wasmtime:api on PR #15110.
:thumbs_up: pchickey submitted PR review.
alexcrichton added PR #15110 [stack-switching] Stack initialisation checks. to the merge queue
github-merge-queue[bot] removed PR #15110 [stack-switching] Stack initialisation checks. from the merge queue
dhil updated PR #15110.
alexcrichton has enabled auto merge for PR #15110.
alexcrichton added PR #15110 [stack-switching] Stack initialisation checks. to the merge queue
:check: alexcrichton merged PR #15110.
alexcrichton removed PR #15110 [stack-switching] Stack initialisation checks. from the merge queue
Last updated: Nov 19 2026 at 20:05 UTC