aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index bdab8d8f4c..4e9df0cd68 100644
--- a/gc.c
+++ b/gc.c
@@ -4235,6 +4235,17 @@ static void
gc_mark_ptr(rb_objspace_t *objspace, VALUE obj)
{
if (LIKELY(objspace->mark_func_data == NULL)) {
+ /* check code for Bug #11244 */
+ if (BUILTIN_TYPE(obj) == T_NONE) {
+ if (objspace->rgengc.parent_object) {
+ rb_bug("gc_mark_ptr: obj is %s (parent: %s)", obj_info(obj),
+ obj_info(objspace->rgengc.parent_object));
+ }
+ else {
+ rb_bug("gc_mark_ptr: obj is %s (parent is not old)", obj_info(obj));
+ }
+ }
+
rgengc_check_relation(objspace, obj);
if (!gc_mark_set(objspace, obj)) return; /* already marked */
gc_aging(objspace, obj);