uweigand opened PR #11689 from uweigand:s390x-regabi-fix to bytecodealliance:main:
When using the tail-call ABI and the callee needs to pop a non-zero amount of bytes, the stack pointer may never be implicitly restored via the LOAD MULTIPLE instruction in the epilog, but will always be manually updated.
In some rare cases involving exception handling, the epilog for such functions incorrectly did include the stack pointer in the LOAD MULTIPLE list. It turns out that the
is_reg_saved_in_prologue routine did not handle the stack pointer correctly.Note that this only makes any difference for functions where cranelift common code includes the stack pointer in the list of clobbered registers passed to compute_frame_layout, which normally never happens as modifications to the stack pointer should be invisible to common code register tracking ...
Fixes: https://github.com/bytecodealliance/wasmtime/issues/11602
<!--
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 ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
uweigand requested abrown for a review on PR #11689.
uweigand requested wasmtime-compiler-reviewers for a review on PR #11689.
uweigand requested wasmtime-core-reviewers for a review on PR #11689.
uweigand requested alexcrichton for a review on PR #11689.
alexcrichton submitted PR review:
Thanks!
alexcrichton merged PR #11689.
Last updated: Dec 06 2025 at 06:05 UTC