Stream: git-wasmtime

Topic: wasmtime / PR #14650 Cranelift: reject too-large stackslo...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 01:24):

cfallin opened PR #14650 from cfallin:fix-stackslot-align to bytecodealliance:main:

We previously accepted arbitrarily large requested alignments for explicit stackslot entities in CLIF. We even tried to give the user this alignment relative to the start of the frame. But in a given ABI, if the stack is only N-aligned on function entry, unless we pad it out to get greater alignment depending on the low bits of SP, an M-aligned (M > N) offset from that initial SP is still only N-aligned.

We could do the complicated thing and try to pad to a greater alignment, but it turns out that we don't need to, at least in Wasmtime. Most things (including ValRaw!) only need 8-alignment. x64, aarch64 and riscv64 can support 16-alignment because their native-ABI stacks are 16-aligned. s390x's stack is only 8-aligned, however, but per above, that's fine for core Wasmtime uses. Stack-switching still requests 16-alignment for a u128, so we'll either need to not do that, or do something fancier, on s390x if/when we support stack switching there. For now, this aligns the Cranelift checks with what we can support in reality, and cleanly rejects invalid requests.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 01:24):

cfallin requested alexcrichton for a review on PR #14650.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 01:24):

cfallin requested wasmtime-compiler-reviewers for a review on PR #14650.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 01:24):

cfallin requested wasmtime-core-reviewers for a review on PR #14650.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 01:36):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 01:36):

alexcrichton has enabled auto merge for PR #14650.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 01:44):

alexcrichton added PR #14650 Cranelift: reject too-large stackslot alignment. to the merge queue

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 03:53):

github-actions[bot] added the label cranelift:area:machinst on PR #14650.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 03:53):

github-actions[bot] added the label cranelift on PR #14650.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 06:14):

:check: alexcrichton merged PR #14650.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 10 2026 at 06:14):

alexcrichton removed PR #14650 Cranelift: reject too-large stackslot alignment. from the merge queue


Last updated: Oct 11 2026 at 04:10 UTC