mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Check if irep is NULL before print_backtrace()
According to the valgrind log attached to #3438, proc->body.irep may be NULL in some cases.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user