Skip to content

coro: retain reflected resources and bind receivers at invocation - #296

Merged
cpunion merged 7 commits into
llvm-corofrom
coro/reflect-resource-handoff-20261018
Oct 17, 2026
Merged

cpunion merged 7 commits into
llvm-corofrom
coro/reflect-resource-handoff-20261018

Conversation

@cpunion

@cpunion cpunion commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Reflected resource results now retain custody from native acquisition through boxing and the outer caller's acceptance. Bound methods also read the original receiver storage at invocation: rebinding an addressable pointer or changing an interface's dynamic type after Method(...).Interface() uses the new receiver, while cancellation retains the receiver snapshot used for the actual acquisition.

The implementation uses the existing borrowed-result guard, private State prefix and managed FFI/helper dispatch. Compiler-typed cold method result prototypes bind the known method bridge; arbitrary MakeFunc keeps ordinary result semantics. Checked archive methods reuse their published primaries and helper ABIs, including large aggregates containing function fields. Library metadata advances to v23; old v22 archives require recompilation. Scheduler and G/P layouts are unchanged.

Regression coverage includes Call/CallSlice, higher-order reflection, Method.Func, bound value/pointer/interface receivers, dynamic resource-to-ordinary and ordinary-to-resource changes, go/defer, recover, zero-sized results, GC, large results, and opaque native archives. Controlled post-native cancellation has a negative control that omits only State transfer and detects the unique-fd leak; ordinary borrowed-fd controls remain open.

Frozen head 3975a706c1b01a3e8341b5b14c0d851728e992b0 (source manifest 0d3c6c5a9cc6ae32820bc3f3c50b2481a157a9cf7ecc042daa8b66ade2646916) has passed compiler/SSA/protocol/FFI, source/architecture and runtime-host gates; 2,462 native FD/Open runs; 315 reflected positive and 18 intentional negative runs; and nine independent archive tests (20 linked images, 60 runs). The original P=2 native exit program passed 10,000 consecutive executions; the new addressable bound-method case passed 1,000 P=2 executions. An actual v22 archive is rejected before link/invocation, and both frozen source trees still match their full manifests.

The follow-up head ef90700c5f7e53612bd73f671ae0ba8b1e6be807 adds only the missing !llgo constraint to the new host SSA regression, matching its existing test helpers. Both ordinary and -tags=llgo host selections pass locally. All other tracked files are byte-identical to the frozen R6 receipt above; those results retain their original head and compiler fingerprint. The previous CI integration failure and its local red/green reproducer are retained.

Local target probes have also passed: six WASI/JS-WASM executions and the Cortex-M QEMU timer protocol. The loaded-host Go/LLGo performance comparison completed 272 throughput/progress executions and 80 independent steady parked-memory executions, with all samples retained; spawn/WaitGroup and File remain material gaps. These are separate from compatibility acceptance.

Fresh full test/go on the frozen R6 source/compiler has completed 276/276, with no failures or skips, matching source-after and a retained test image. All 45 nested compiler process domains joined successfully. Demo, stdlib and GOROOT acceptance use those same frozen production inputs; the latest partial checkpoint is recorded below. The selected GOROOT scope is the existing 1,082 CI runtime cases, as requested; the other 1,316 discovered compilation/diagnostic/multifile cases remain an explicit coverage boundary. Raw GOROOT failures remain visible: noinit.go links gc's private main..inittask symbol; rangegen.go exceeds the 10 GiB generated-compilation RSS ceiling, including a same-source retry with a lower Go heap soft target. The main 10 GiB attempt did not reach generated-program semantics. A separate same-source, default-optimization 24 GiB supplemental retry now passes generated execution/output checks at 20,833.0 MiB whole-tree peak, after the original larger-budget run was interrupted by its monitor. The supplemental pass does not rewrite the main-matrix failure. Neither original raw failure is converted into a pass or skip.

Exact-head CI run 39073066329 passes 20/20 at ef90700c5f7e53612bd73f671ae0ba8b1e6be807; fresh paginated reviews, inline/issue comments and review threads are empty. The native/resource/archive feature gates are complete. The separate compatibility campaign remains incomplete, with the resumed checkpoint below and all raw failures retained. Earlier disk-floor interruptions remain classified as infrastructure outcomes. No whole-project or exact-new-head all-suite pass is asserted.

Compatibility checkpoint at 2026-10-18T03:16:47Z on the frozen production R6 inputs: executable Go demos are 73/73 and full test/go is 276/276, with matching source-after. Stdlib has 61/180 complete successful fixture packages, with 720 passing test/subtest events and 2 existing debug/buildinfo skips. Five prior disk-floor compilation attempts across four packages remain retained infrastructure records. GOROOT has 616/1082 complete case receipts: runner 614 PASS / 2 FAIL, comprising 604 actual execution/output-check passes, 10 existing expected-failure classifications, and the two original raw failures described above. 466 selected runtime cases remain unfinished. The existing expected failure heapsampling.go was diagnosed with an external empty xfail file: it reports zero sampled objects where 45,000--55,000 are expected; current size-class profile records do not populate allocation stacks. It remains a runtime profiling compatibility gap.

The user restored storage; four GOROOT and four stdlib workers have resumed with unchanged production source/compiler and per-program hard limits. A single GOROOT continuation was needed after a five-second directory-capacity scan timed out. Its complete cases remain accepted, its interrupted batch is rerun, and a bounded sampling-retry adapter passes real-scan and simulated timeout/ENOENT/rejection controls. Original outcomes and retired-controller source/corpus-after receipts remain retained. This is incomplete acceptance, not a whole-suite pass. The checked-in partial ledger is doc/coro-acceptance-progress.md; runtime receipts retain the frozen production R6 identity.

@cpunion cpunion changed the title coro: retain reflected resources through caller acceptance coro: retain reflected resources and bind receivers at invocation Oct 17, 2026
@cpunion
cpunion marked this pull request as ready for review October 17, 2026 23:24
@cpunion
cpunion merged commit d8597d4 into llvm-coro Oct 17, 2026
20 checks passed
@cpunion
cpunion deleted the coro/reflect-resource-handoff-20261018 branch October 24, 2026 02:11
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