Stream: git-wasmtime

Topic: wasmtime / PR #13704 Exclude guard page from stack bounds...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 05:19):

SebTardif opened PR #13704 from SebTardif:fix-guard-page-accounting to bytecodealliance:main:

Fix the bounds check in VMContinuationStack::initialize to compare
against usable stack space rather than total allocation size.

Prior to #13662, initialize() had no bounds check at all, so a
high-arity function type (e.g. 600 params on an 8192-byte stack)
would unconditionally write control data into the guard page and
segfault. PR #13662 added a bounds check, but compared against
self.len which for Mmap allocations includes the guard page. This
meant the 600-param case still slipped through: 9664 <= 12288
passed the check, but the write still landed in the non-writable
guard page.

This fix subtracts the guard page size for Mmap allocations so
the check reflects the actual usable stack space. Custom
allocations are unaffected since their len does not include a
guard page.

Adds a regression test matching the exact scenario from #13703
(600 params on an 8192-byte stack).

Closes #13703

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 05:19):

SebTardif requested cfallin for a review on PR #13704.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 05:19):

SebTardif requested wasmtime-core-reviewers for a review on PR #13704.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 08:42):

github-actions[bot] added the label wasmtime:api on PR #13704.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 21:35):

:memo: cfallin submitted PR review:

LGTM; thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 21:35):

cfallin has enabled auto merge for PR #13704.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 21:35):

:thumbs_up: cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 21:35):

cfallin added PR #13704 Exclude guard page from stack bounds check in initialize to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 21:57):

:check: cfallin merged PR #13704.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 22 2026 at 21:57):

cfallin removed PR #13704 Exclude guard page from stack bounds check in initialize from the merge queue.


Last updated: Jul 29 2026 at 05:03 UTC