rvolosatovs opened PR #14629 from rvolosatovs:fix/x64-large-callee-pop to bytecodealliance:main:
The
tailandwinchcalling conventions pop their stack arguments on return, which x64 does withret imm16.gen_returnconverted the size withu16::try_from(..).unwrap(), but stack arguments may be up to 128 MiB, so compiling atailorwinchfunction with 64 KiB or more of stack arguments, or atailfunction thatreturn_calls such a callee, panicked.Reject such signatures with
CodegenError::ImplLimitExceededincompute_arg_locs, alongside the existing stack-argument size limit. Since this runs for every signature a function references, it also covers the callee's signature atreturn_callsites, which grows the caller's tail-argument area. Other backends pop with anspadjustment and aren't affected. Wasm can't reach this: 1000 parameters is about 16 KiB of stack arguments.
github-actions[bot] added the label cranelift on PR #14629.
github-actions[bot] added the label cranelift:area:x64 on PR #14629.
:thumbs_up: cfallin submitted PR review:
This is still in Draft but it looks right to me if you're happy to mark as ready and merge it!
rvolosatovs has marked PR #14629 as ready for review.
rvolosatovs requested fitzgen for a review on PR #14629.
rvolosatovs requested wasmtime-compiler-reviewers for a review on PR #14629.
rvolosatovs added PR #14629 cranelift(x64): reject callee-pop stack args that don't fit ret imm16 to the merge queue
github-merge-queue[bot] removed PR #14629 cranelift(x64): reject callee-pop stack args that don't fit ret imm16 from the merge queue
rvolosatovs updated PR #14629.
rvolosatovs has enabled auto merge for PR #14629.
rvolosatovs added PR #14629 cranelift(x64): reject callee-pop stack args that don't fit ret imm16 to the merge queue
:check: rvolosatovs merged PR #14629.
rvolosatovs removed PR #14629 cranelift(x64): reject callee-pop stack args that don't fit ret imm16 from the merge queue
Last updated: Oct 11 2026 at 04:10 UTC