summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2024-04-12 09:18:47 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2024-04-18 14:21:01 -0700
commit6443d690aead62d8d1ecd3fe32601455496390c6 (patch)
tree56d861596b4af156ea9106863e31f416fa120268
parent64d0817ea995ddf46aacc8f9da11b234e4e77962 (diff)
Don't mark empty singleton cc's
These cc's aren't managed by the garbage collector so we shouldn't try to mark and move them.
-rw-r--r--iseq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 15635332ff..38f756d9c8 100644
--- a/iseq.c
+++ b/iseq.c
@@ -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);
}