runtime: track caller frames for LLGo metadata#1884
Conversation
|
Pushed fix 5a8e97f (runtime: limit caller frame instrumentation).\n\nRoot cause from the failed logs: caller-frame instrumentation was enabled for nearly every non-runtime package. That shifted LLVM IR in the FileCheck suites and pulled caller runtime dependencies into embedded/cross-target builds, producing widespread link failures such as stdout/vfprintf/pthread_* undefined symbols.\n\nLocal validation on /Users/lijie/source/goplus/llgo-wt-goroot-debugline:\n- go test ./ssa\n- go test ./test/go -run TestRuntimeCaller\n- go test ./cl (cl package passed; the combined command exited after unrelated runtime/internal direct-package setup failures)\n- go build -o /tmp/llgo-debugline ./cmd/llgo\n- GOWORK=off /tmp/llgo-debugline run . in _demo/go/runtime\n- ../../../dev/llgo.sh build -target ae-rp2040 -o /tmp/llgo-debugline-ae-rp2040-empty.elf ./empty\n- ../../../dev/llgo.sh build -target ae-rp2040 -o /tmp/llgo-debugline-ae-rp2040-defer.elf ./defer\n\nNew CI is queued/running on head 5a8e97f; monitoring now. |
|
CI follow-up for 5a8e97f:\n\n- Go/test (ubuntu-latest, 19): success\n- Targets/llgo (ubuntu-latest, 19): success\n- LLGo/llgo (ubuntu-latest, 19, Go 1.21.13): success\n- LLGo/llgo (ubuntu-latest, 19, Go 1.24.2): success\n- LLGo/llgo (ubuntu-latest, 19, Go 1.26.0): success\n- LLGo ubuntu test shards and hello jobs observed so far: success\n\nNo failed checks on the new head at this point. Remaining macOS and release-artifact jobs are still queued by GitHub runners. |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Updated with fc4eae3. This narrows the new coverage to recovered nil panic -> runtime.CallersFrames metadata: frame stack marks are truncated on return after recover, call-site line metadata is set before callee/receiver evaluation, and LLGo anonymous frame names are normalized to Go-style .funcN. Removed only the Go 1.26 devirtualization_nil_panics.go xfails. I also checked inline_caller.go/inline_callers.go as same caller/debugline domain on Go 1.26 darwin-arm64, but left the remaining inline xfails in place because this commit did not revalidate every listed version/platform for those entries. No xgo-dev branch push. |
|
Update on
CI has been retriggered from the fork head; at the time of this comment the new checks are queued on the PR. |
Summary
$1to Go-style.func1test/gocoverage for runtime.Caller, Callers, CallersFrames, FuncForPC, Func.FileLine, line numbers, function names, recovered nil-panic frame metadata, and inline caller/callers metadatainline_caller.goandinline_callers.goxfails for Go 1.24/1.25/1.26 on linux/amd64 and darwin/arm64, plus Go 1.26devirtualization_nil_panics.goxfails already covered by this PRTesting
go test ./test/go -count=1env LLGO_GOROOT_VERBOSE=1 LLGO_GOROOT_HEARTBEAT_SECONDS=60 bash ./dev/test_goroot.sh /Users/lijie/sdk/go1.24.11 /Users/lijie/sdk/go1.25.0 /Users/lijie/sdk/go1.26.0 -- -dirs . -case '^(inline_caller|inline_callers|maymorestack)\\.go$' -directive-mode ci -xfail /tmp/llgo-empty-xfail-missing.yaml -run-timeout 60s(empty xfail reproduction: inline cases pass on darwin/arm64;maymorestack.gostill fails withpanic: mayMoreStack not called)env LLGO_GOROOT_VERBOSE=1 LLGO_GOROOT_HEARTBEAT_SECONDS=60 bash ./dev/test_goroot.sh /Users/lijie/sdk/go1.24.11 /Users/lijie/sdk/go1.25.0 /Users/lijie/sdk/go1.26.0 -- -dirs . -case '^(inline_caller|inline_callers|maymorestack)\\.go$' -directive-mode ci -run-timeout 60s(cd runtime && go test ./... -count=1)go test ./ssa -count=1go test ./runtime/... ./ssa/... ./cl/... -count=1was attempted from the repo root;ssa/...andcl/...completed successfully, but the command exited 1 becauseruntimeis a separate module and./runtime/...is not a root-module package patterngit diff --checkScope Notes
inline_caller.goandinline_callers.gonow pass locally on Go 1.24.11, Go 1.25.0, and Go 1.26.0 darwin/arm64 with an empty xfail file; their remaining xfails are removed because they exercise the same runtime caller/debugline metadata path now covered intest/go.maymorestack.goremains xfailed for Go 1.24/1.25/1.26 on darwin/arm64 and linux/amd64. Its current local failure ispanic: mayMoreStack not called, which is a-d=maymorestackhook/instrumentation issue rather than caller/debugline metadata.