From f4169b21e6f9d3aaab2db937d89c5b0ca7b55e70 Mon Sep 17 00:00:00 2001 From: Ralph Date: Mon, 20 Jul 2026 04:39:54 -0700 Subject: [PATCH] chore(lint): allowlist the guarded GcHeader probe in collection_proto_thunks (#6659) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #6659 (fac2bbead) added a `(ptr as *const u8).sub(GC_HEADER_SIZE) as *const GcHeader` obj_type probe in collection_proto_thunks.rs without an addr-class allowlist entry, so the address-classification audit (the `lint` gate) went red on main and on every open PR branched from it. The probe is correctly magnitude-classified — it runs only inside `if is_above_handle_band(ptr) && is_valid_obj_ptr(ptr as *const u8)`, so the pointer is never a handle-band small integer at the deref. Add the standard allowlist entry (same shape as the sibling object/* probes) with a follow-up note to migrate it to `addr_class::try_read_gc_header`. Restores lint to green; no functional change. --- scripts/addr_class_allowlist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/addr_class_allowlist.txt b/scripts/addr_class_allowlist.txt index b118618296..8c8ce6254c 100644 --- a/scripts/addr_class_allowlist.txt +++ b/scripts/addr_class_allowlist.txt @@ -136,6 +136,7 @@ crates/perry-runtime/src/object/global_this/ | * | pre-existing GcHeader probe p crates/perry-runtime/src/object/class_registry/ | * | pre-existing GcHeader probe predating addr_class; address validated by call-site guards (magnitude/registry/is_valid_obj_ptr) -- migrate to addr_class::try_read_gc_header in a follow-up (split of class_registry.rs) crates/perry-runtime/src/object/descriptor_state.rs | * | pre-existing GcHeader probe predating addr_class; address validated by call-site guards (magnitude/registry/is_valid_obj_ptr) -- migrate to addr_class::try_read_gc_header in a follow-up (split of object/mod.rs) crates/perry-runtime/src/object/to_string_tag.rs | * | pre-existing GcHeader probe predating addr_class; address validated by call-site guards (magnitude/registry/is_valid_obj_ptr) -- migrate to addr_class::try_read_gc_header in a follow-up (split of object/mod.rs) +crates/perry-runtime/src/object/collection_proto_thunks.rs | * | GcHeader obj_type probe guarded by is_above_handle_band + is_valid_obj_ptr (magnitude-classified before the deref); migrate to addr_class::try_read_gc_header in a follow-up (added in #6659) crates/perry-runtime/src/symbol/ | * | pre-existing GcHeader probe predating addr_class; address validated by call-site guards (magnitude/registry/is_valid_obj_ptr) -- migrate to addr_class::try_read_gc_header in a follow-up (split of symbol.rs) crates/perry-runtime/src/typedarray/ | * | pre-existing GcHeader probe predating addr_class; address validated by call-site guards (magnitude/registry/is_valid_obj_ptr) -- migrate to addr_class::try_read_gc_header in a follow-up (split of typedarray/mod.rs) crates/perry-runtime/src/process/ | * | pre-existing GcHeader probe predating addr_class; address validated by call-site guards (magnitude/registry/is_valid_obj_ptr) -- migrate to addr_class::try_read_gc_header in a follow-up (split of process.rs)