Repository navigation
fix(gc): rearm closure young log after slot rewrites - #11118
proggeramlug merged 2 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughClosure slot visits now note rewritten dynamic property values and static prototypes before re-inserting entries. New tests check that minor collections evacuate those rewritten values on old closures. ChangesClosure slot visits
Priority: ⚪ Not assessed Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The closure rewrite fix has no identified merge-blocking issue; complete the normal checks before merging. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes #11117.
Closure dynamic properties and static prototypes are temporarily removed from their side tables while GC layout visitors rewrite their slots. If a visitor changed an old value to a nursery or survivor pointer, those paths republished the entry without re-arming
CLOSURE_YOUNG_OWNERS. The next minor-scoped scan could therefore skip a live young pointer, and the debug completeness check reported the rule-1 assertion from the issue.This change notes the owner before republishing rewritten dynamic properties or a rewritten static prototype. The normal setter already follows the same pre-publish rule.
Validation
young log for closure.dynamic_props does not name ...; restoring them makes both pass.cargo test -p perry-runtime --lib gc::tests::young_log_tests::— 29 passed.RUST_TEST_THREADS=1 cargo test -p perry-stdlib --lib readline::mod_tests::listeners_provider_roots_readable_snapshot_across_array_allocation -- --exact --nocapture— passed.cargo check -p perry-runtime --all-targets— passed.cargo fmt --all -- --check— passed.scripts/check_file_size.sh— passed.Summary by CodeRabbit