Skip to content

Commit

Permalink
Don't mark empty singleton cc's
Browse files Browse the repository at this point in the history
These cc's aren't managed by the garbage collector so we shouldn't try
to mark and move them.
  • Loading branch information
eileencodes authored and tenderlove committed Apr 18, 2024
1 parent 64d0817 commit 6443d69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iseq.c
Expand Up @@ -292,6 +292,10 @@ static bool
cc_is_active(const struct rb_callcache *cc, bool reference_updating)
{
if (cc) {
if (cc == rb_vm_empty_cc() || rb_vm_empty_cc_for_super()) {
return false;
}

if (reference_updating) {
cc = (const struct rb_callcache *)rb_gc_location((VALUE)cc);
}
Expand Down

0 comments on commit 6443d69

Please sign in to comment.