debug: handle storage-free Python attributes#2145
Open
cpunion wants to merge 1 commit into
Open
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
cpunion
force-pushed
the
codex/dwarf-python-types
branch
from
July 22, 2026 09:20
a1df5de to
b178917
Compare
cpunion
marked this pull request as ready for review
July 22, 2026 09:21
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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.
Problem
Python module attributes are frontend pseudo-variables. LLGo loads and stores them through Python C API calls, so their
ssa.Exprhas a source-facing type but no native LLVM global or address.With DWARF enabled, the generic global path tried to derive a native debug type and attach a
DIGlobalVariableExpressionto that absent storage. Compiling_testpy/listtherefore reachedpyVarTy.Underlyingand panicked withdon't call.Changes
ssa.Builder.DIGlobalignore expressions that have no native LLVM storageDW_TAG_variablefor dynamically resolved Python attributes_testpyfixture set with DWARF enabled on supported hostsFixes #2117.
Verification
macOS arm64, Go 1.26.5 / LLVM 19:
_testpyfixtures pass with DWARFgo test ./ssapassesO0,O1,O2,O3,Os, andOzDIGlobalpaths are covered directlyUbuntu arm64 container, limited to 2 CPUs, 15 GiB memory, and 512 PIDs:
_testpyfixtures pass with DWARF_testpy/matrixstill reproduces the same existing runtime crash with and without DWARF; this PR does not add a skip or hide that baseline failure