Skip to content

runtime,cl: Go-style panic tracebacks and exact log/slog/testing locations, with gc-verified acceptance suite#2023

Closed
cpunion wants to merge 60 commits into
xgo-dev:mainfrom
cpunion:codex/stage5-acceptance
Closed

runtime,cl: Go-style panic tracebacks and exact log/slog/testing locations, with gc-verified acceptance suite#2023
cpunion wants to merge 60 commits into
xgo-dev:mainfrom
cpunion:codex/stage5-acceptance

Conversation

@cpunion

@cpunion cpunion commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

End-user acceptance for the Stage 5 unwinder (#2019): make the caller info an application developer actually sees correct — panic tracebacks, log/slog locations, testing failure lines — and lock it in with a gc-verified acceptance suite.

What the acceptance run exposed (before this PR)

Scenario gc llgo before llgo after
unrecovered panic goroutine trace with file:line per frame [0x… main+0x4, SP = 0x24] (dladdr, one frame, no file:line) Go-style traceback
log.Lshortfile main.go:11: ???:1: main.go:11:
slog AddSource source=…/main.go:12 source=:0 source=…/main.go:12
t.Errorf under llgo test x_test.go:6: ???:1: x_test.go:6:

Fixes

  • Go-style panic tracebacks: unrecovered panics print goroutine 1 [running]: plus function(...) / indented file:line per physical frame, via a PanicTraceback hook the public runtime registers with the runtime core; the clite dladdr dump remains the fallback when the FP walk or tables are unavailable. Runtime-internal plumbing frames are filtered by package path (gc hides runtime frames the same way).

  • Uniform caller-frame tracking — no package whitelist: the blanket stdlib exclusion is gone. The existing per-package "transitively reaches runtime.Caller" analysis now applies to stdlib exactly as it always did to third-party code, so log.Output, slog's Logger.log and testing's decorate chains keep physical frames and fixed Caller depths count correctly. Packages that never read caller pcs still track nothing and pay nothing.

  • Cross-package call-site anchors: a call into a caller-pc-consuming function of another package (the frame a fixed depth attributes) gets a statement anchor, so log.Println("x") reports the exact line even though the calling function itself never reads caller pcs. Decided by the same analysis (memoized per package), not by name.

  • Collector: directly-called methods: a type used only concretely never enters RuntimeTypes, so its methods escaped tracking — exactly how slog.(*Logger).Info lost its frame. Methods are now collected from the package's own type declarations (both receiver forms).

  • gc-conformant naming and format: the main package's display name is normalized to main regardless of the module name (frame filters in the wild match on the main. prefix; linker symbols keep the package path), closures display as gc's .funcN instead of $N, and traceback lines carry gc's +0x<pc-entry> offset (value is codegen-specific, format matches).

  • Program-unique frames pinned: main.main and package init run once, so noinline is free — they are the bottom frames of nearly every panic traceback and now report exact statement lines. //go:noinline functions already keep their frames and get statement anchors too.

Conformance bar (agreed): format and user-code file:line match gc exactly; runtime-internal, patched-stdlib and startup frames may differ (different runtime, accepted).

Cost: hello-world grows 368 bytes (the traceback printer); no IR golden changed; plain.* code paths are untouched.

Acceptance suite (test/go/caller_acceptance_test.go)

Four probes, every expectation verified against gc: panic traceback contents; log.Lshortfile + slog AddSource (text and JSON handlers, package functions and logger methods); a failing t.Errorf under llgo test; and an introspection grab-bag — goroutine/init/defer callers, FuncForPC names for value/pointer methods, closures and generic instantiations, and the errors-with-stack capture idiom (zap/sentry style).

Documented divergences observed while writing the suite:

  • Closure display names are normalized to gc's .funcN form (linker symbols keep $N); the suite accepts both forms for robustness.
  • Linker ICF folds identical function bodies to one address, so FuncForPC reports the surviving symbol (gc does not fold); probes use distinct bodies.
  • Cross-package wrapper chains (zap→zapcore style) are outside the per-package analysis; their wrappers may still inline. The P4 inline tree subsumes this.
  • Plain (non-noinline, non-pc-consuming) user functions appearing mid-traceback in a panic still show declaration-adjacent lines: statement anchors structurally require the containing function to survive (the ELF pcline section is link-ordered to its symbol), so full coverage without noinline needs the P4 metadata mechanisms. Bottom frames (main.main, init), //go:noinline functions, and every attributed frame in the log/slog/testing/Caller scenarios are exact.

Manual playground (test/_manualtest/, committed)

Five directories runnable with both go and llgo for side-by-side comparison: panic/ (traceback shape), logging/ (log/slog locations), callers/ (Caller ladder, frames, FuncForPC names, errors-with-stack), testfail/ (llgo test failure lines), cexcept/ (hardware faults in C called from Go — segv recovery verified on darwin/arm64 + linux/arm64/amd64; known gaps recorded in its README: fault-site stack needs the panic-snapshot follow-up, SIGFPE/SIGBUS handlers and sigaltstack not installed yet). Every scenario also has a test/go regression: the acceptance tests above plus TestCallerAcceptanceModuleMainNaming (module-named main package must still report main.*) and TestCallerAcceptanceCFaultRecover (C NULL-store converts to a recoverable Go panic).

Validation (both platforms, before every push)

  • Acceptance suite 4/4 on macOS arm64 and linux arm64 (container); statement-line and line-info suites still green.
  • cl (725s), ssa, internal/build, test/go all ok; gentests produced no golden diffs.
  • Linux container: every _demo/go demo passes plain and an LTO (-lto=full -globaldce) subset — including the reflect demos whose ELF pcline sections dangled in the first CI round (anchors in inlinable functions; fixed by making frame-keeping a tracking criterion rather than a per-call exception).
  • Panic traceback offset verified against disassembly (+0x30 = return address − function entry for the probe).

Based on #2019 (contains #2012 and #2016); rebases as those merge.

🤖 Generated with Claude Code

@cpunion
cpunion force-pushed the codex/stage5-acceptance branch 2 times, most recently from ab82a5d to b8f8ff3 Compare July 4, 2026 03:36
@cpunion
cpunion force-pushed the codex/stage5-acceptance branch 4 times, most recently from e6a4518 to 5d7c3f0 Compare July 4, 2026 04:58
@cpunion
cpunion force-pushed the codex/stage5-acceptance branch from 5d7c3f0 to 5e895e7 Compare July 4, 2026 06:12
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 6, 2026
…l, 75m job)

The macos coverage job's test step already ran at ~44-45m on the xgo-dev#2023
base (job wall 50:56); the recover-ownership tests push it past the 45m
internal go-test alarm — killed at 45m with ~10 minutes of suites left.
Not a performance regression: local full ssa+cl on the same tree run in
~10 minutes; the mac CI runner is ~5x slower on llgo-building tests.
cpunion and others added 4 commits July 8, 2026 13:25
…ct log/slog/testing locations

An unrecovered panic now prints a Go-style traceback (function names plus
file:line per physical frame) through a PanicTraceback hook the public
runtime registers; the clite dladdr dump remains the fallback when the FP
walk or the tables are unavailable.

Caller-frame tracking now applies uniformly: the blanket stdlib exclusion
is gone, so the same per-package reaches-runtime.Caller analysis that
already covered third-party code tracks log.Output, slog's Logger.log and
testing's decorate chains (their thin wrappers were inlined, making fixed
Caller depths count past them — log.Lshortfile printed "???:1"). Call
sites into caller-pc-consuming functions of other packages get a statement
anchor so the attributed frame reports the exact line. The collector also
picks up named-type methods declared by the package itself — a type used
only concretely never enters RuntimeTypes, which is exactly how
slog.(*Logger).Info escaped tracking.

hello-world size cost: +368 bytes (the traceback printer).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Four scenarios, every expectation verified against gc: unrecovered panic
tracebacks; log.Lshortfile and slog AddSource (text+JSON, package funcs and
logger methods); a failing t.Errorf under llgo test; and an introspection
grab-bag (goroutine/init/defer callers, FuncForPC names for methods,
closures and generics, the errors-with-stack capture idiom).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cpunion
cpunion force-pushed the codex/stage5-acceptance branch from a5fa2fc to 37c127c Compare July 8, 2026 05:26
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
…upport

Re-expresses the surviving value of xgo-dev#1892 on the xgo-dev#2023 base (its other
~10k lines were an earlier draft of the funcinfo/pclntab machinery,
since superseded by xgo-dev#2012/xgo-dev#2016/xgo-dev#2019):

- //go:nointerface methods no longer satisfy interfaces: the pragma is
  recorded at import (cl/import.go -> Program.SetNoInterfaceMethod) and
  filtered out of abi uncommon method tables; GlobalDCE metadata takes
  the filtered selection list. Retires the typeparam/mdempsky/15
  goroot xfails (validated go1.26 darwin, ci directive mode).
- Type-assertion failure between same-named types from different
  scopes appends '(types from different scopes)' (gc wording).
- MatchesClosure unwraps closure types on both sides, fixing assertions
  between closure and plain function types.
- reflect.(*rtype).Method builds the method func value with the closure
  layout allocation (fixes reflect method-value identity).
- xfail: retire fixedbugs/issue16130, fixedbugs/issue29735 (validated
  go1.24 + go1.26 darwin), and reword typeparam/mdempsky/16 - the
  panic value now implements runtime.Error; the message still lacks
  the source interface type and prints the command-line-arguments
  package path.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
Re-expresses xgo-dev#1906 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- cl gains a liveness analysis for stack-allocated objects: allocas
  whose last use has passed are cleared so bdwgc's conservative stack
  scan stops keeping dead stack objects (and what they point to) alive;
  pointer registers are clobbered around the trigger points
  (llgo_clobber_pointer_regs) and dead stack slots holding the target
  are zeroed (llgo_clear_stack_ptr, pthread stack-bounds walk).
- runtime.SetFinalizer paths (mfinal, runtime_gc, bdwgc binding) hook
  the cleared-slot machinery so finalizers for dead stack objects run.
- xfail: retire deferfin.go, stackobj.go, stackobj3.go, validated on
  darwin/arm64 go1.24 + go1.26 (stackobj2 already passed).

Carries the xgo-dev#2035 shared-GOCACHE commit temporarily (same patch-id,
auto-dedups when the chain rebases after xgo-dev#2035 merges).

Supersedes xgo-dev#1906.
@cpunion

cpunion commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Folding into #2024 (contains this PR's commits rebased onto current main; see #2012 for the chain note).

@cpunion cpunion closed this Jul 8, 2026
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
…upport

Re-expresses the surviving value of xgo-dev#1892 on the xgo-dev#2023 base (its other
~10k lines were an earlier draft of the funcinfo/pclntab machinery,
since superseded by xgo-dev#2012/xgo-dev#2016/xgo-dev#2019):

- //go:nointerface methods no longer satisfy interfaces: the pragma is
  recorded at import (cl/import.go -> Program.SetNoInterfaceMethod) and
  filtered out of abi uncommon method tables; GlobalDCE metadata takes
  the filtered selection list. Retires the typeparam/mdempsky/15
  goroot xfails (validated go1.26 darwin, ci directive mode).
- Type-assertion failure between same-named types from different
  scopes appends '(types from different scopes)' (gc wording).
- MatchesClosure unwraps closure types on both sides, fixing assertions
  between closure and plain function types.
- reflect.(*rtype).Method builds the method func value with the closure
  layout allocation (fixes reflect method-value identity).
- xfail: retire fixedbugs/issue16130, fixedbugs/issue29735 (validated
  go1.24 + go1.26 darwin), and reword typeparam/mdempsky/16 - the
  panic value now implements runtime.Error; the message still lacks
  the source interface type and prints the command-line-arguments
  package path.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
Re-expresses xgo-dev#1906 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- cl gains a liveness analysis for stack-allocated objects: allocas
  whose last use has passed are cleared so bdwgc's conservative stack
  scan stops keeping dead stack objects (and what they point to) alive;
  pointer registers are clobbered around the trigger points
  (llgo_clobber_pointer_regs) and dead stack slots holding the target
  are zeroed (llgo_clear_stack_ptr, pthread stack-bounds walk).
- runtime.SetFinalizer paths (mfinal, runtime_gc, bdwgc binding) hook
  the cleared-slot machinery so finalizers for dead stack objects run.
- xfail: retire deferfin.go, stackobj.go, stackobj3.go, validated on
  darwin/arm64 go1.24 + go1.26 (stackobj2 already passed).

Carries the xgo-dev#2035 shared-GOCACHE commit temporarily (same patch-id,
auto-dedups when the chain rebases after xgo-dev#2035 merges).

Supersedes xgo-dev#1906.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
…upport

Re-expresses the surviving value of xgo-dev#1892 on the xgo-dev#2023 base (its other
~10k lines were an earlier draft of the funcinfo/pclntab machinery,
since superseded by xgo-dev#2012/xgo-dev#2016/xgo-dev#2019):

- //go:nointerface methods no longer satisfy interfaces: the pragma is
  recorded at import (cl/import.go -> Program.SetNoInterfaceMethod) and
  filtered out of abi uncommon method tables; GlobalDCE metadata takes
  the filtered selection list. Retires the typeparam/mdempsky/15
  goroot xfails (validated go1.26 darwin, ci directive mode).
- Type-assertion failure between same-named types from different
  scopes appends '(types from different scopes)' (gc wording).
- MatchesClosure unwraps closure types on both sides, fixing assertions
  between closure and plain function types.
- reflect.(*rtype).Method builds the method func value with the closure
  layout allocation (fixes reflect method-value identity).
- xfail: retire fixedbugs/issue16130, fixedbugs/issue29735 (validated
  go1.24 + go1.26 darwin), and reword typeparam/mdempsky/16 - the
  panic value now implements runtime.Error; the message still lacks
  the source interface type and prints the command-line-arguments
  package path.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 8, 2026
Re-expresses xgo-dev#1906 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- cl gains a liveness analysis for stack-allocated objects: allocas
  whose last use has passed are cleared so bdwgc's conservative stack
  scan stops keeping dead stack objects (and what they point to) alive;
  pointer registers are clobbered around the trigger points
  (llgo_clobber_pointer_regs) and dead stack slots holding the target
  are zeroed (llgo_clear_stack_ptr, pthread stack-bounds walk).
- runtime.SetFinalizer paths (mfinal, runtime_gc, bdwgc binding) hook
  the cleared-slot machinery so finalizers for dead stack objects run.
- xfail: retire deferfin.go, stackobj.go, stackobj3.go, validated on
  darwin/arm64 go1.24 + go1.26 (stackobj2 already passed).

Carries the xgo-dev#2035 shared-GOCACHE commit temporarily (same patch-id,
auto-dedups when the chain rebases after xgo-dev#2035 merges).

Supersedes xgo-dev#1906.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 9, 2026
…upport

Re-expresses the surviving value of xgo-dev#1892 on the xgo-dev#2023 base (its other
~10k lines were an earlier draft of the funcinfo/pclntab machinery,
since superseded by xgo-dev#2012/xgo-dev#2016/xgo-dev#2019):

- //go:nointerface methods no longer satisfy interfaces: the pragma is
  recorded at import (cl/import.go -> Program.SetNoInterfaceMethod) and
  filtered out of abi uncommon method tables; GlobalDCE metadata takes
  the filtered selection list. Retires the typeparam/mdempsky/15
  goroot xfails (validated go1.26 darwin, ci directive mode).
- Type-assertion failure between same-named types from different
  scopes appends '(types from different scopes)' (gc wording).
- MatchesClosure unwraps closure types on both sides, fixing assertions
  between closure and plain function types.
- reflect.(*rtype).Method builds the method func value with the closure
  layout allocation (fixes reflect method-value identity).
- xfail: retire fixedbugs/issue16130, fixedbugs/issue29735 (validated
  go1.24 + go1.26 darwin), and reword typeparam/mdempsky/16 - the
  panic value now implements runtime.Error; the message still lacks
  the source interface type and prints the command-line-arguments
  package path.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 9, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 9, 2026
Re-expresses xgo-dev#1906 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- cl gains a liveness analysis for stack-allocated objects: allocas
  whose last use has passed are cleared so bdwgc's conservative stack
  scan stops keeping dead stack objects (and what they point to) alive;
  pointer registers are clobbered around the trigger points
  (llgo_clobber_pointer_regs) and dead stack slots holding the target
  are zeroed (llgo_clear_stack_ptr, pthread stack-bounds walk).
- runtime.SetFinalizer paths (mfinal, runtime_gc, bdwgc binding) hook
  the cleared-slot machinery so finalizers for dead stack objects run.
- xfail: retire deferfin.go, stackobj.go, stackobj3.go, validated on
  darwin/arm64 go1.24 + go1.26 (stackobj2 already passed).

Carries the xgo-dev#2035 shared-GOCACHE commit temporarily (same patch-id,
auto-dedups when the chain rebases after xgo-dev#2035 merges).

Supersedes xgo-dev#1906.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 16, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 17, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 17, 2026
…upport

Re-expresses the surviving value of xgo-dev#1892 on the xgo-dev#2023 base (its other
~10k lines were an earlier draft of the funcinfo/pclntab machinery,
since superseded by xgo-dev#2012/xgo-dev#2016/xgo-dev#2019):

- //go:nointerface methods no longer satisfy interfaces: the pragma is
  recorded at import (cl/import.go -> Program.SetNoInterfaceMethod) and
  filtered out of abi uncommon method tables; GlobalDCE metadata takes
  the filtered selection list. Retires the typeparam/mdempsky/15
  goroot xfails (validated go1.26 darwin, ci directive mode).
- Type-assertion failure between same-named types from different
  scopes appends '(types from different scopes)' (gc wording).
- MatchesClosure unwraps closure types on both sides, fixing assertions
  between closure and plain function types.
- reflect.(*rtype).Method builds the method func value with the closure
  layout allocation (fixes reflect method-value identity).
- xfail: retire fixedbugs/issue16130, fixedbugs/issue29735 (validated
  go1.24 + go1.26 darwin), and reword typeparam/mdempsky/16 - the
  panic value now implements runtime.Error; the message still lacks
  the source interface type and prints the command-line-arguments
  package path.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 17, 2026
Re-expresses xgo-dev#1906 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- cl gains a liveness analysis for stack-allocated objects: allocas
  whose last use has passed are cleared so bdwgc's conservative stack
  scan stops keeping dead stack objects (and what they point to) alive;
  pointer registers are clobbered around the trigger points
  (llgo_clobber_pointer_regs) and dead stack slots holding the target
  are zeroed (llgo_clear_stack_ptr, pthread stack-bounds walk).
- runtime.SetFinalizer paths (mfinal, runtime_gc, bdwgc binding) hook
  the cleared-slot machinery so finalizers for dead stack objects run.
- xfail: retire deferfin.go, stackobj.go, stackobj3.go, validated on
  darwin/arm64 go1.24 + go1.26 (stackobj2 already passed).

Carries the xgo-dev#2035 shared-GOCACHE commit temporarily (same patch-id,
auto-dedups when the chain rebases after xgo-dev#2035 merges).

Supersedes xgo-dev#1906.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 18, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 18, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 19, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 20, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 23, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 23, 2026
Re-expresses xgo-dev#1906 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- cl gains a liveness analysis for stack-allocated objects: allocas
  whose last use has passed are cleared so bdwgc's conservative stack
  scan stops keeping dead stack objects (and what they point to) alive;
  pointer registers are clobbered around the trigger points
  (llgo_clobber_pointer_regs) and dead stack slots holding the target
  are zeroed (llgo_clear_stack_ptr, pthread stack-bounds walk).
- runtime.SetFinalizer paths (mfinal, runtime_gc, bdwgc binding) hook
  the cleared-slot machinery so finalizers for dead stack objects run.
- xfail: retire deferfin.go, stackobj.go, stackobj3.go, validated on
  darwin/arm64 go1.24 + go1.26 (stackobj2 already passed).

Carries the xgo-dev#2035 shared-GOCACHE commit temporarily (same patch-id,
auto-dedups when the chain rebases after xgo-dev#2035 merges).

Supersedes xgo-dev#1906.
cpunion added a commit to cpunion/llgo that referenced this pull request Jul 23, 2026
Re-expresses xgo-dev#1918 on the xgo-dev#2023 base (its remaining ~11k diff lines were
the pre-xgo-dev#2012 funcinfo draft, superseded by the stage-5 chain):

- recover() only succeeds when called directly by a deferred function
  (gc semantics): the panic node records the owning Defer frame at
  rethrow (panicKey/panicNode + GoDeferData), and Recover checks the
  caller is that frame's direct deferred call. Closure wraps carry
  StartRecoverFrameAlias/EndRecoverFrame so method-value and closure
  adapters stay transparent to the ownership check.
- Rethrow keeps the xgo-dev#2023 PanicTraceback hook on the unrecovered path.
- xfail: retire fixedbugs/issue4066 (2m-timeout entries; now runs in
  ~2.7s), fixedbugs/issue73916 and issue73916b (go1.26 recover
  semantics), validated on darwin/arm64 go1.26.

Supersedes xgo-dev#1918.
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.

1 participant