From 02a92a1329acaa5c4a3d1d6ee2c426e4cdd336b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Wed, 2 Sep 2026 21:11:17 +0200 Subject: [PATCH] =?UTF-8?q?fix(lint):=20repair=20main-side=20gate=20breaks?= =?UTF-8?q?=20=E2=80=94=20local-binding=20allowlist=20path=20after=20the?= =?UTF-8?q?=20dispatch=20split,=20two=20new=20StringHeader=20payload=20sit?= =?UTF-8?q?es=20via=20counted=20readers=20(ratchet=20359->358),=20#9514's?= =?UTF-8?q?=20concat-site=20symbol=20in=20POLL=5FCAPABLE=5FRUNTIME,=20unus?= =?UTF-8?q?ed=20import=20in=20the=20capture-stash=20split?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/perry-hir/src/lower/tests/capture_stash.rs | 2 -- crates/perry-runtime/src/builtins/formatting/errors.rs | 8 +++----- crates/perry-runtime/src/gc/tests/error_side_tables.rs | 10 ++-------- scripts/gc_root_dominance_check.py | 4 ++++ scripts/local_binding_type_allowlist.json | 2 +- scripts/string_payload_access_baseline.txt | 2 +- 6 files changed, 11 insertions(+), 17 deletions(-) diff --git a/crates/perry-hir/src/lower/tests/capture_stash.rs b/crates/perry-hir/src/lower/tests/capture_stash.rs index 4b76d405ab..9d2cdbef96 100644 --- a/crates/perry-hir/src/lower/tests/capture_stash.rs +++ b/crates/perry-hir/src/lower/tests/capture_stash.rs @@ -2,8 +2,6 @@ //! stash must follow `super()`, not constructor entry. Split from `tests.rs` //! for the 2000-line file cap. -use super::*; - /// A derived class with captured outers whose `super()` is not its own /// statement — the minifier's `super(a), this.x = b, …` comma sequence, as in /// Next's `AppRouteRouteModule` — must stash the `this.__perry_cap_*` fields diff --git a/crates/perry-runtime/src/builtins/formatting/errors.rs b/crates/perry-runtime/src/builtins/formatting/errors.rs index 2bc86f7e96..76eaa7543c 100644 --- a/crates/perry-runtime/src/builtins/formatting/errors.rs +++ b/crates/perry-runtime/src/builtins/formatting/errors.rs @@ -177,14 +177,12 @@ pub(super) unsafe fn format_error_subclass_headline( if key_ptr.is_null() { continue; } - let key_len = (*key_ptr).byte_len as usize; - let key_data = (key_ptr as *const u8).add(std::mem::size_of::()); - let key_bytes = std::slice::from_raw_parts(key_data, key_len); - if key_bytes == b"name" { + let key_str = string_header_to_string(key_ptr as *mut StringHeader, ""); + if key_str == "name" { own_name = Some(obj_h.with_const_ptr::( |obj_ptr| crate::object::js_object_get_field_f64(obj_ptr, index), )); - } else if key_bytes == b"message" { + } else if key_str == "message" { own_message = Some(obj_h.with_const_ptr::( |obj_ptr| crate::object::js_object_get_field_f64(obj_ptr, index), )); diff --git a/crates/perry-runtime/src/gc/tests/error_side_tables.rs b/crates/perry-runtime/src/gc/tests/error_side_tables.rs index 01359018c8..a89c6a0647 100644 --- a/crates/perry-runtime/src/gc/tests/error_side_tables.rs +++ b/crates/perry-runtime/src/gc/tests/error_side_tables.rs @@ -138,14 +138,8 @@ fn test_moved_fs_enoent_round_trips_through_util_inspect() { f64::from_bits(crate::value::TAG_UNDEFINED), ); let inspected = crate::value::JSValue::from_bits(inspected.to_bits()); - let text = unsafe { - let ptr = inspected.as_string_ptr(); - let bytes = std::slice::from_raw_parts( - (ptr as *const u8).add(std::mem::size_of::()), - (*ptr).byte_len as usize, - ); - String::from_utf8_lossy(bytes).into_owned() - }; + let text = + unsafe { crate::symbol::str_from_header(inspected.as_string_ptr()).unwrap_or_default() }; assert!(text.contains("code: 'ENOENT'"), "missing ENOENT: {text}"); assert!( text.contains("path: '/perry-9530-definitely-missing'"), diff --git a/scripts/gc_root_dominance_check.py b/scripts/gc_root_dominance_check.py index 83c712ef6d..bf12b3833c 100755 --- a/scripts/gc_root_dominance_check.py +++ b/scripts/gc_root_dominance_check.py @@ -1385,6 +1385,10 @@ def is_collecting(callee): # already listed. So the entry is an omission at introduction, not a # judgement call. "js_string_concat_value_box", + # #9514's per-site concat cache: `js_string_concat_site_value` calls + # `js_string_concat_value_box` on its miss path, so it can allocate and + # re-enter a moving minor exactly like its callee (the #7616 shape). + "js_string_concat_site_value", # `js_private_brand_add` is the referent-with-no-name that NEITHER audit can # ask for: `--audit-poll-reach` only walks symbols `ALLOC_RE` matches, and # `js_private_brand_add` matches no alloc/new/create convention, so the one diff --git a/scripts/local_binding_type_allowlist.json b/scripts/local_binding_type_allowlist.json index ba25e0587e..60842631bb 100644 --- a/scripts/local_binding_type_allowlist.json +++ b/scripts/local_binding_type_allowlist.json @@ -322,7 +322,7 @@ "reason": "The proof API supplies only runtime-derived initializer evidence and rejects the binding after any write in the region." }, { - "path": "crates/perry-codegen/src/lower_call/property_get/dynamic_dispatch.rs", + "path": "crates/perry-codegen/src/lower_call/property_get/dispatch_receiver_class.rs", "function": "guarded_declared_receiver_class_candidate", "access": "local_type_hint", "count": 1, diff --git a/scripts/string_payload_access_baseline.txt b/scripts/string_payload_access_baseline.txt index bdcb03ad74..0b68403029 100644 --- a/scripts/string_payload_access_baseline.txt +++ b/scripts/string_payload_access_baseline.txt @@ -12,7 +12,7 @@ inline-offset | perry-ext-nodemailer | 1 inline-offset | perry-ext-pg | 2 inline-offset | perry-ext-zlib | 3 inline-offset | perry-ffi | 3 -inline-offset | perry-runtime | 359 +inline-offset | perry-runtime | 358 inline-offset | perry-stdlib | 48 inline-offset | perry-updater | 5 reader-helper | perry-ext-ethers | 1