Skip to content

Commit c5947b4

Browse files
committed
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
1 parent b5aed98 commit c5947b4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

imemo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ rb_imemo_mark_and_move(VALUE obj, bool reference_updating)
316316
else {
317317
if (vm_cc_super_p(cc) || vm_cc_refinement_p(cc)) {
318318
rb_gc_mark_movable((VALUE)cc->cme_);
319+
rb_gc_mark_movable((VALUE)cc->klass);
319320
}
320321
}
321322

0 commit comments

Comments
 (0)