Skip to content

Commit

Permalink
Avoid null pointer in backtrace and avoid segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
usev6 committed Apr 6, 2020
1 parent c7e75be commit a4689f9
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 a4689f9

Please sign in to comment.