Shared TT_ENV may need to be marked; fix #3550

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-04-11 12:40:26 +09:00
parent fff4a4ed34
commit 6dd1a570c2
+1 -1
View File
@@ -646,7 +646,6 @@ gc_mark_children(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj)
struct REnv *e = (struct REnv*)obj;
mrb_int i, len;
if MRB_ENV_STACK_SHARED_P(e) break;
len = MRB_ENV_STACK_LEN(e);
for (i=0; i<len; i++) {
mrb_gc_mark_value(mrb, e->stack[i]);
@@ -761,6 +760,7 @@ obj_free(mrb_state *mrb, struct RBasic *obj, int end)
case MRB_TT_FIBER:
{
struct mrb_context *c = ((struct RFiber*)obj)->cxt;
if (!end && c && c != mrb->root_c) {
mrb_callinfo *ci = c->ci;
mrb_callinfo *ce = c->cibase;