runtime: attribute panic caller lines#1925
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Added focused package-level coverage for the panic caller-line instrumentation paths. Changes:
Local verification:
Pushed commit: CI/Codecov are now rerunning on the updated PR head. |
|
Merged latest The single remaining Local verification:
Pushed commit: |
ac1ef9f to
f499d7f
Compare
f499d7f to
a6d9ee6
Compare
a6d9ee6 to
1f15203
Compare
Summary
runtime.Caller(2)can report the panic sitetest/gocoverage for explicit panic, nil field panic, bounds panicCallersFrames, and deferred return caller linesbug347.go,bug348.go,issue14646.go,issue29504.go,issue4562.go, andissue5856.goScope
issue27201.goxfailed: it depends onruntime.Stackline output, which is covered by the separate lineinfo/runtime.Stack work.issue33724.goxfailed: it currently fails because the promoted-method nil access does not panic, which is nil/method semantics rather than caller-line attribution.Tests
go test ./test/go -run TestRuntimePanicCallerLineAttribution -count=1 -timeout=10mgo test ./test/go -run 'TestRuntime(Caller|Callers|PanicCaller)' -count=1 -timeout=10mgo test ./test/goroot -run TestGoRootRunCases -count=1 -timeout=15m -args -goroot /opt/homebrew/Cellar/go@1.24/1.24.11/libexec -dirs fixedbugs -case '^(fixedbugs/(bug347|bug348|issue14646|issue29504|issue4562|issue5856)\\.go)$' -xfail /dev/null -run-timeout 2m -build-timeout 5mgo test ./test/goroot -run TestGoRootRunCases -count=1 -timeout=15m -args -goroot /opt/homebrew/Cellar/go@1.24/1.24.11/libexec -dirs fixedbugs -case '^(fixedbugs/(bug347|bug348|issue14646|issue29504|issue4562|issue5856)\\.go)$' -run-timeout 2m -build-timeout 5mgo test ./test/goroot -run TestGoRootRunCases -count=1 -timeout=15m -args -goroot /opt/homebrew/Cellar/go@1.24/1.24.11/libexec -dirs fixedbugs -case '^(fixedbugs/(bug347|bug348|issue14646|issue27201|issue29504|issue33724|issue4562|issue5856)\\.go)$' -run-timeout 2m -build-timeout 5mgo test ./ssa -count=1 -timeout=15mgo test ./cl -count=1 -timeout=15m(cd runtime && go test ./... -count=1 -timeout=15m)git diff --check