Fix wrong the number of marked objects of MRB_TT_ENV in gray mark phase

If MRB_TT_ENV has stack shared flag or bidx flag, flags is too large
than the real stack size.
This commit is contained in:
Kouhei Sutou
2018-04-26 15:25:36 +09:00
parent 1c66d42e47
commit 4194fe9d65
+1 -1
View File
@@ -938,7 +938,7 @@ gc_gray_mark(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj)
break;
case MRB_TT_ENV:
children += (int)obj->flags;
children += MRB_ENV_STACK_LEN(obj);
break;
case MRB_TT_FIBER: