[Based on #2143] fix(pclntab): preserve Darwin line sites with DWARF#2157
Draft
cpunion wants to merge 9 commits into
Draft
[Based on #2143] fix(pclntab): preserve Darwin line sites with DWARF#2157cpunion wants to merge 9 commits into
cpunion wants to merge 9 commits into
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
cpunion
force-pushed
the
codex/dwarf-pcln-sites-v2
branch
from
July 22, 2026 16:31
e38170d to
d9bdbba
Compare
cpunion
force-pushed
the
codex/dwarf-pcln-sites-v2
branch
from
July 23, 2026 05:08
d9bdbba to
a0b796a
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #2143.
Problem
Darwin builds with DWARF currently disable every compiler-emitted funcinfo site record. That avoids an LLDB lexical-scope regression caused by inline assembly at function entry, but it also removes the final-PC anchors used to build precise runtime line tables. In larger binaries, runtime.Caller, runtime.CallersFrames, logging source prefixes, and panic locations can then fall back to an earlier address.
The two site classes have different debugger effects: function-entry and closure-stub address records alter the initial line-table row, while PC-line anchors are safe when the inline-assembly call itself has no debug location.
#2143 supplies the DWARF-safe optimized compilation pipeline. This PR is stacked on it so the explicit DWARF acceptance path is tested with the intended optimization behavior.
Changes
ssa.Builder.InlineAsmNoDebug, which clears only the emitted call location and preserves the builder current location-ldflags=-w=falseacceptance test forruntime.Caller,runtime.CallersFrames, andlog.LshortfileThis does not change pclntab mode selection, the default
-wpolicy, runtime table format, or LLDB language behavior.Fixes #2115.
Verification
_lldb/runtest.sh, 198/198, plus the non-LLGo marker checkInlineAsmNoDebug, PC-line policy, address-site policy, and the funcinfo-site gate: 100% statement coverage in focused runsgit diff --check upstream/main...HEADUbuntu validation was limited to 2 CPUs, 15 GiB memory, and 512 PIDs.