summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2022-05-05 16:30:56 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2022-05-05 17:37:07 -0400
commitcae85c528c7c8ea1dd3ba634db5ccb9e465707f7 (patch)
tree3644f11483aa721a03780845b3d020a7862c5af7
parent7448afccb32f78115c05af03421984aa2f2aaf58 (diff)
Mark RCLASS_INCLUDER
Since 4d8f76286beefbb8f7fba2479f6d0a0b4a47304c, we need to dereference the includer field on iclasses, so we need to mark it to make sure it's alive. Sometimes during compaction we crash because the field is dangling, though I have a hard time constructing such a situation. See http://ci.rvm.jp/results/trunk@ruby-iga/3947725
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5890
-rw-r--r--gc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 22a1839fb3..3710bafce3 100644
--- a/gc.c
+++ b/gc.c
@@ -6994,6 +6994,10 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
gc_mark(objspace, RCLASS_SUPER(obj));
}
if (!RCLASS_EXT(obj)) break;
+
+ if (RCLASS_INCLUDER(obj)) {
+ gc_mark(objspace, RCLASS_INCLUDER(obj));
+ }
mark_m_tbl(objspace, RCLASS_CALLABLE_M_TBL(obj));
cc_table_mark(objspace, obj);
break;