Commit 146a9eeb authored by Simon Génier's avatar Simon Génier

Fix segfault on mrb_exc_backtrace.

The code to iterate over backtrace locations was changed in #3065, but
unfortunately output_backtrace was not correctly updated to forward the
callback.
parent f3cce240
...@@ -175,7 +175,10 @@ output_backtrace_i(mrb_state *mrb, struct backtrace_location_raw *loc_raw, void ...@@ -175,7 +175,10 @@ output_backtrace_i(mrb_state *mrb, struct backtrace_location_raw *loc_raw, void
static void static void
output_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, output_stream_func func, void *data) output_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, output_stream_func func, void *data)
{ {
each_backtrace(mrb, ciidx, pc0, output_backtrace_i, data); struct output_backtrace_args args;
args.func = func;
args.data = data;
each_backtrace(mrb, ciidx, pc0, output_backtrace_i, &args);
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment