Skip to content

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Oct 7, 2025

If the ABI requires a backchain pointer, FP unwinding is always possible, safe, and fast, so there's really no reason not to use it.

If the ABI requires a backchain pointer, FP unwinding is always possible, safe,
and fast, so there's really no reason not to use it.
@alexrp
Copy link
Member Author

alexrp commented Oct 7, 2025

FYI @mlugg

@alexrp alexrp enabled auto-merge (rebase) October 7, 2025 04:03
@leecannon
Copy link
Contributor

While I think this is a good idea, FP based unwinding does have a disadvange of missing inlined functions meaning both explicitly inlined and ones inlined due to optimizations will be missed from the trace.

While the current DWARF based trace printing code does not detect and print inlined frames it could be enhanced to do so.

@mlugg
Copy link
Member

mlugg commented Oct 7, 2025

While I think this is a good idea, FP based unwinding does have a disadvange of missing inlined functions meaning both explicitly inlined and ones inlined due to optimizations will be missed from the trace.

AFAIK, that isn't true. After the relevant std.debug.Dwarf enhancements (#19407) we should be able to print these either way. DWARF basically just tells us that there are multiple user-readable stack frames corresponding to a single program counter address; it doesn't care whether we got those addresses from DWARF unwind information or FP unwinding (since the results should be the same anyway!). Put more concisely, inlined frames come from the stack trace printing logic, not the collection logic.

@alexrp
Copy link
Member Author

alexrp commented Oct 7, 2025

Test failure is #25498.

@alexrp alexrp disabled auto-merge October 7, 2025 14:44
@alexrp alexrp merged commit 9760068 into ziglang:master Oct 7, 2025
8 of 9 checks passed
@alexrp alexrp deleted the std-debug-prefer-fp branch October 7, 2025 14:44
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.

3 participants