Skip to content

Cranelift: fix unwind info around tail calls. - #14642

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
cfallin:fix-tail-unwinding
Oct 10, 2026
Merged

alexcrichton merged 1 commit into
bytecodealliance:mainfrom
cfallin:fix-tail-unwinding

Conversation

@cfallin

@cfallin cfallin commented Oct 9, 2026

Copy link
Copy Markdown
Member

While Wasmtime doesn't use the DWARF unwind info / frame definitions, it is still useful to try to get them to be as correct as possible, because native debugging and especially native profiling (perf record, samply, etc) use this info.

Previously, the definition of the CFA did not quite stay in sync with a valid frame when we move the frame due to a resizing argument area on tail-calls. This PR reworks the metadata to instead define the CFA in terms of the FP and leave FP unchanged until we switch to the new frame.

While Wasmtime doesn't use the DWARF unwind info / frame definitions,
it is still useful to try to get them to be as correct as possible,
because native debugging and especially native profiling (`perf
record`, `samply`, etc) use this info.

Previously, the definition of the CFA did not quite stay in sync with
a valid frame when we move the frame due to a resizing argument area
on tail-calls. This PR reworks the metadata to instead define the CFA
in terms of the FP and leave FP unchanged until we switch to the new
frame.
@cfallin
cfallin requested a review from a team as a code owner October 9, 2026 22:51
@cfallin
cfallin requested review from alexcrichton and removed request for a team October 9, 2026 22:51
@alexcrichton
alexcrichton enabled auto-merge October 9, 2026 22:59
@alexcrichton
alexcrichton added this pull request to the merge queue Oct 9, 2026
Merged via the queue into bytecodealliance:main with commit 2cb329d Oct 10, 2026
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants