Mark the class on orphan call caches

"super" CC's are "orphans", meaning there is no class CC table that
points at them.  Since they are orphans, we should mark the class
reference so that if the cache happens to be used, the class will still
be alive
This commit is contained in:
Aaron Patterson 2024-06-05 11:26:25 -07:00 committed by Aaron Patterson
parent a661c82972
commit e5160a9c60

View File

@ -316,6 +316,7 @@ rb_imemo_mark_and_move(VALUE obj, bool reference_updating)
else {
if (vm_cc_super_p(cc) || vm_cc_refinement_p(cc)) {
rb_gc_mark_movable((VALUE)cc->cme_);
rb_gc_mark_movable((VALUE)cc->klass);
}
}