fix(runtime): bind static handle method names - #8284
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe runtime and standard-library property dispatchers now resolve supported method names to static byte literals before binding methods. Tests cover primitive numbers, EventEmitter, AsyncLocalStorage, SQLite, and TLS dispatch. ChangesStatic bound-method name resolution
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The change binds standard-library method names to static storage and includes targeted tests plus repository checks; no actionable merge-blocking risk remains. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
Merging. Runtime 2569 passed / 0 failed / 4 ignored, codegen 28 suites, 1510 passed, 9 failed — all nine baseline, The fix is type-level, which is the right kind for this bug. One note on your validation list: |
Closes #8178.
Summary
js_class_method_bindretains its method-name pointer in the bound closure. The stdlib handle-property dispatchers were forwarding slices backed by the caller's movable GC heap string, so computed method reads could retain an interior pointer after the string moved or died.&'static [u8]literals before bindingValidation
cargo test -p perry-runtime --lib handle_bound_method_name -- --nocapture(7 passed)cargo test -p perry-stdlib --lib static_method_name -- --nocapture(4 passed)RUSTFLAGS="-D warnings" cargo check -p perry-runtime -p perry-stdlib --all-targetscargo fmt --all -- --check./scripts/check_file_size.shpython3 scripts/ci_plan.py --self-testpython3 scripts/gc_store_site_inventory.py --self-test && python3 scripts/gc_store_site_inventory.pypython3 scripts/addr_class_inventory.py --self-test && python3 scripts/addr_class_inventory.pySummary by CodeRabbit