Should have marked all ensure stack entries; fix #3855 fix #3856

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-11-22 12:18:20 +09:00
parent 8b7a8978e2
commit 393133e741
+1 -2
View File
@@ -599,8 +599,7 @@ mark_context(mrb_state *mrb, struct mrb_context *c)
}
}
/* mark ensure stack */
for (i=0; i<c->esize; i++) {
if (c->ensure[i] == NULL) break;
for (i=0; i<c->eidx; i++) {
mrb_gc_mark(mrb, (struct RBasic*)c->ensure[i]);
}
/* mark fibers */