ruby-changes:54305
From: ko1 <ko1@a...>
Date: Mon, 24 Dec 2018 00:02:21 +0900 (JST)
Subject: [ruby-changes:54305] ko1:r66514 (trunk): move checking code.
ko1 2018-12-24 00:02:17 +0900 (Mon, 24 Dec 2018) New Revision: 66514 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66514 Log: move checking code. * gc.c (gc_mark_ptr): this check was introduced by accidentaly (this is why message is "...", crazy simple) for debugging. However, this check is useful because if there is T_NONE object here, we can't know which object points to it. For debugging reason, I remain this checking code and set reasonable error message. Modified files: trunk/gc.c Index: gc.c =================================================================== --- gc.c (revision 66513) +++ gc.c (revision 66514) @@ -4570,9 +4570,9 @@ static void https://github.com/ruby/ruby/blob/trunk/gc.c#L4570 gc_mark_ptr(rb_objspace_t *objspace, VALUE obj) { if (LIKELY(objspace->mark_func_data == NULL)) { - if (RB_TYPE_P(obj, T_NONE)) rb_bug("..."); rgengc_check_relation(objspace, obj); if (!gc_mark_set(objspace, obj)) return; /* already marked */ + if (RB_TYPE_P(obj, T_NONE)) rb_bug("try to mark T_NONE object"); /* check here will help debugging */ gc_aging(objspace, obj); gc_grey(objspace, obj); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/