summaryrefslogtreecommitdiff
path: root/imemo.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-12-19 13:52:01 -0500
committerPeter Zhu <[email protected]>2024-12-19 16:25:23 -0500
commit33f95d632dce42fac35da29eaed33f0a5a4f0dcb (patch)
tree1ebba0b4a06523c5be84adb33e775f6566eb4af5 /imemo.c
parent84eff67644aa0dabb996daf68eb060c2f3f5c7bb (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12402
Diffstat (limited to 'imemo.c')
-rw-r--r--imemo.c7
1 files changed, 0 insertions, 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; i<ccs->len; 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));