From 22ac62a4f19d07cdbf0e31d8b098137e1bbd8772 Mon Sep 17 00:00:00 2001 From: fleuria Date: Wed, 7 Aug 2013 19:42:56 +0800 Subject: fix #1442 in the marking root phase, we only marked the root context, but leaving the current context unmarked. when we execute a fiber, the current context would be changed and trigger this issue. --- src/gc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gc.c b/src/gc.c index f8e4a3b20..105713a3d 100644 --- a/src/gc.c +++ b/src/gc.c @@ -677,6 +677,10 @@ root_scan_phase(mrb_state *mrb) mrb_gc_mark(mrb, (struct RBasic*)mrb->exc); mark_context(mrb, mrb->root_c); + if (mrb->root_c != mrb->c) { + mark_context(mrb, mrb->c); + } + /* mark irep pool */ if (mrb->irep) { size_t len = mrb->irep_len; -- cgit v1.2.3