Skip to content


Check if irep is NULL before print_backtrace()
Browse files Browse the repository at this point in the history
According to the valgrind log attached to #3438, proc->body.irep
may be NULL in some cases.
  • Loading branch information
matz committed Feb 8, 2017
1 parent af4d74f commit 4b32e65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func
if (MRB_PROC_CFUNC_P(ci->proc)) continue;

irep = ci->proc->body.irep;
if (!irep) continue;

if (mrb->c->cibase[i].err) {
pc = mrb->c->cibase[i].err;
Expand Down

0 comments on commit 4b32e65

Please sign in to comment.