Skip to content

runtime: add line info for stack frames#1926

Draft
cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/goroot-fixedbugs-lineinfo-coverage
Draft

runtime: add line info for stack frames#1926
cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/goroot-fixedbugs-lineinfo-coverage

Conversation

@cpunion
Copy link
Copy Markdown
Collaborator

@cpunion cpunion commented May 24, 2026

Summary

  • add native PC symbolization for runtime.Caller, CallersFrames, FuncForPC, and runtime.Stack
  • preserve non-signal panic PCs so debug.Stack can report panic-site file:line
  • enable line-info debug locations by default and emit dSYM on Darwin host builds
  • keep debug-only SSA values from dropping required nil/bounds checks
  • preserve single-case select receive assignment ordering when line info adds DebugRef instructions
  • add stable test/go coverage for Caller/CallersFrames/FuncForPC/debug.Stack
  • remove Darwin xfail entries for fixedbugs issue22083, issue29735, and issue7690

Tests

  • go test ./test/go -run TestRuntimeLineInfoAndStack -count=1
  • go test ./internal/build -count=1
  • go test ./cl -run 'TestCompile|TestFromTestgo|TestRunAndTestFromTestgo' -count=1
  • go test ./test/go -count=1
  • go test ./test/goroot -run TestGoRoot -goroot /opt/homebrew/Cellar/go/1.26.0/libexec -dirs fixedbugs -case 'fixedbugs/(issue22083|issue29735|issue7690)\.go' -count=1

Notes

  • left Linux/versioned xfails in place
  • skipped GC/liveness/finalizer/goroutine and defer/recover semantic cases

@cpunion cpunion force-pushed the codex/goroot-fixedbugs-lineinfo-coverage branch from 570148d to 366b139 Compare May 24, 2026 15:45
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cl/compile.go 94.11% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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