Skip to content

std.debug.Dwarf.SelfUnwinder: assume same-value rule by default for all columns - #25523

Merged
alexrp merged 1 commit into
ziglang:masterfrom
alexrp:gcc-kinda-sucks
Oct 10, 2025
Merged

std.debug.Dwarf.SelfUnwinder: assume same-value rule by default for all columns#25523
alexrp merged 1 commit into
ziglang:masterfrom
alexrp:gcc-kinda-sucks

Conversation

@alexrp

Copy link
Copy Markdown
Member

It's kind of remarkable how many terrible things we have to live with today can be traced back to GCC.

This fixes leaf function unwinding, presumably among other things.

@mlugg

Copy link
Copy Markdown
Member

This seems wrong: the has_return_address check is important! An explicit DW_CFA_undefined on the return address register tells us to end the trace. I'm... honestly not sure how CI is even passing here?

…ll columns
This fixes leaf function unwinding, presumably among other things.
@alexrp

Copy link
Copy Markdown
MemberAuthor

This seems wrong: the has_return_address check is important! An explicit DW_CFA_undefined on the return address register tells us to end the trace.

Oops, good point.

I'm... honestly not sure how CI is even passing here?

Most libc startup code and thread entry points explicitly zero the link register; some ABIs even require them to do so. We do this for all targets in Zig code and in our bundled musl. glibc startup code mostly does it too, although it's pretty inconsistent from arch to arch. Can't speak for macOS libc though.

@alexrp
alexrp enabled auto-merge (rebase) October 10, 2025 11:05
@alexrp
alexrp merged commit 9aeabad into ziglang:masterOct 10, 2025
9 checks passed
@alexrp
alexrp deleted the gcc-kinda-sucks branch October 10, 2025 13:27
Sign up for freeto 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

@alexrp@mlugg