Permalink
Browse files

Mark classes referenced from saved backtrace.

Maybe related to #3438
  • Loading branch information...
matz committed Feb 8, 2017
1 parent f3d4ff1 commit b277c58e783f187cfff1b7bb5843d2e95d3c3b0b
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gc.c
View
@@ -857,7 +857,12 @@ root_scan_phase(mrb_state *mrb, mrb_gc *gc)
mrb_gc_mark(mrb, (struct RBasic*)mrb->top_self);
/* mark exception */
mrb_gc_mark(mrb, (struct RBasic*)mrb->exc);
/* mark backtrace */
mrb_gc_mark(mrb, (struct RBasic*)mrb->backtrace.exc);
e = (size_t)mrb->backtrace.n;
for (i=0; i<e; i++) {
mrb_gc_mark(mrb, (struct RBasic*)mrb->backtrace.entries[i].klass);
}
/* mark pre-allocated exception */
mrb_gc_mark(mrb, (struct RBasic*)mrb->nomem_err);
#ifdef MRB_GC_FIXED_ARENA

0 comments on commit b277c58

Please sign in to comment.