Skip to content

Commit

Permalink
prevent perf map output from segfaulting
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Sep 8, 2021
1 parent 5d43eea commit 356e117
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/jit/compile.c
Expand Up @@ -138,8 +138,10 @@ MVMJitCode * MVM_jit_compile_graph(MVMThreadContext *tc, MVMJitGraph *jg) {

#if linux
/* Native Call compiles code that doesn't correspond
* to a staticframe, in which case we just skip this. */
if (tc->instance->jit_perf_map && jg->sg->sf) {
* to a staticframe, in which case we just skip this.
* Sometimes code ends up null here as well, in which
* case we also skip. */
if (tc->instance->jit_perf_map && jg->sg->sf && code) {
MVMStaticFrame *sf = jg->sg->sf;
char symbol_name[1024];
char *file_location = MVM_staticframe_file_location(tc, sf);
Expand Down

0 comments on commit 356e117

Please sign in to comment.