summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-23 15:02:17 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-23 15:02:17 (GMT)
commitff8a775c57dc9a5640fb26b5e061bcdf01292c29 (patch)
tree20be84134c0f83b83550e4b110518432bc0e80ec
parent4c9f3ce7b1a35ac891550ccd7b3de1be7475f2d4 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 0e1a4f3..71a3f03 100644
--- a/gc.c
+++ b/gc.c
@@ -4570,9 +4570,9 @@ static void
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);
}