summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorfleuria <[email protected]>2013-08-07 19:42:56 +0800
committerfleuria <[email protected]>2013-08-07 19:42:56 +0800
commit22ac62a4f19d07cdbf0e31d8b098137e1bbd8772 (patch)
treea7d66defd0622b165cba77e5d361c2f3bed4120f /src
parent7d82b935db709f5c8be83e2ca64ad9d02ec5c0e9 (diff)
downloadmruby-22ac62a4f19d07cdbf0e31d8b098137e1bbd8772.tar.gz
mruby-22ac62a4f19d07cdbf0e31d8b098137e1bbd8772.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/gc.c4
1 files changed, 4 insertions, 0 deletions
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;