Skip to content

Commit

Permalink
Merge pull request #1268 from usev6/Rakudo#3605
Browse files Browse the repository at this point in the history
Avoid null pointer in backtrace and avoid segfault
  • Loading branch information
niner committed Apr 6, 2020
2 parents c7e75be + a4689f9 commit 838e683
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/exceptions.c
Expand Up @@ -573,7 +573,8 @@ MVMObject * MVM_exception_backtrace(MVMThreadContext *tc, MVMObject *ex_obj) {

/* row will contain "sub" and "annotations" */
row = MVM_repr_alloc_init(tc, tc->instance->boot_types.BOOTHash);
MVM_repr_bind_key_o(tc, row, k_sub, cur_frame->code_ref);
MVM_repr_bind_key_o(tc, row, k_sub,
cur_frame->code_ref ? cur_frame->code_ref : tc->instance->VMNull);
MVM_repr_bind_key_o(tc, row, k_anno, annotations);

MVM_repr_push_o(tc, arr, row);
Expand Down

0 comments on commit 838e683

Please sign in to comment.