From 33f95d632dce42fac35da29eaed33f0a5a4f0dcb Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 19 Dec 2024 13:52:01 -0500 Subject: [PATCH] Don't unpoison the CC in vm_ccs_free The poison status is maintained by the GC, so don't unpoison it in vm_ccs_free. If the object is not a garbage object, then it should not be poisoned. --- imemo.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/imemo.c b/imemo.c index 93aa125052..254f3d177b 100644 --- a/imemo.c +++ b/imemo.c @@ -461,7 +461,6 @@ vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, VALUE klass) for (int i=0; ilen; i++) { const struct rb_callcache *cc = ccs->entries[i].cc; if (!alive) { - void *ptr = asan_unpoison_object_temporary((VALUE)cc); // ccs can be free'ed. if (rb_gc_pointer_to_heap_p((VALUE)cc) && !rb_objspace_garbage_object_p((VALUE)cc) && @@ -470,14 +469,8 @@ vm_ccs_free(struct rb_class_cc_entries *ccs, int alive, VALUE klass) // OK. maybe target cc. } else { - if (ptr) { - rb_asan_poison_object((VALUE)cc); - } continue; } - if (ptr) { - rb_asan_poison_object((VALUE)cc); - } } VM_ASSERT(!vm_cc_super_p(cc) && !vm_cc_refinement_p(cc));