Repository navigation
Compose boxed String builtin freshness with user returns - #8420
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to No actionable defect is established in the changed String-sharing behavior. Merge after the normal pending checks complete. Security Architecture Review
Pre-merge checks |
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Singleton accessor publication is not fully represented in the sharing holder graph. Replacing the generic container effects could lose an alias returned directly by a class method or indirectly through an instance arm. Keep the previous effects whenever the program declares singleton readers or writers; explicit class-method writes remain eligible. Add direct and transitive identity regressions and an explicit-write control.
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
41f4733 to
d02b51e
Compare
What this changes
Under
--share-strings, a boxed String call such asThread.new { "https://" }.value.sub("://", "")can be refused because the program also defines a same-named user method. The sharing walk applies generic container effects instead of composing the existing String builtin effect with the user returns.Compose these effects only when the builtin metadata and complete dispatch shape account for the call. Revalidate the recorded builtin effect before using it for freshness, and preserve every user return and retained argument. Analyzer plan queries use an uncached resolver so inference cannot seed a premature code-generation plan.
Singleton accessor publication is not fully represented by the holder graph. Programs declaring singleton readers or writers therefore retain the existing container effects, including when an instance-method arm reaches that storage through a helper. Explicit class-method writes remain eligible. Generic tests cover these direct/transitive aliases as well as fresh, borrowed, nil, and container returns.
Validation
Full
make -j6 gate CC=gcc-12 GATE_CACHE=1 TEST_JOBS= BENCH_PJOBS=1passed on Linux x86_64, merged with master4412e698feb4. Headd02b51ec9fb1carries the verified Gate trailer for tested treed35667493d4c; attestation changed no source or compiler bytes.The two listed shared-corpus failures already exist on master4412. Focused baseline/candidate compiles produce identical #6765 refusals for both; the known-failure list was not changed.
Six new focused sharing-verifier cases passed on the preceding identical patch. Direct/transitive alias controls and GC stress 0/1 match frozen CRuby 4.0; actual native borrowed bindings remain refused.
Optcarrot generated C is byte-identical to master4412 (616,836 bytes; SHA-256
c05a6c722851314f695b908536097947f324d9c430fb81d5749b42d71b4adefa); checksum 59662 and all six scale ratios match.The separate full sharing verifier is not green on clean master
61dedaeaor the prior patched9e0fe408integration: both have the same two unratcheted exception-channel diagnostics, one net_http_zlib generated-C parity failure, eight stale entries, and 115 channel gaps. Complete normalized logs match; current4412e698focused baseline/candidate checks also match. No ratchet entry was added or waived, and unobserved channels are not proven safe.Hosted clang CI and full CodeRabbit review passed on
41f473318d67, the exact same tree. No actionable review comments remain; the generic docstring warning remains disclosed. Hosted clang CI and Gate verification also pass on the final attested headd02b51ec9fb1(run); the final review-thread check found zero threads. Other platform lanes are skipped by the PR workflow.New tests have
.expectedfiles matching CRuby 4.0 with--enable-frozen-string-literalNo added test uses values past 2^31
Complete
make gateand same-master compiler-performance comparisonDepends on: none