Skip to content

Commit

Permalink
ASAN: warn if our SIGSEGV handler will be blocked.
Browse files Browse the repository at this point in the history
SIGSEGV can be benign, but ASAN will die so we need to be able to handle the signal ourselves (see #17706).
  • Loading branch information
maleadt committed Jul 31, 2016
1 parent 08c04a8 commit 170a53e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,17 @@ void _julia_init(JL_IMAGE_SEARCH rel)
}
#endif


#ifdef JL_ASAN_ENABLED
const char *asan_options = getenv("ASAN_OPTIONS");
if (!asan_options || !(strstr(asan_options, "allow_user_segv_handler=1") ||
strstr(asan_options, "handle_segv=0"))) {
jl_printf(JL_STDERR,"WARNING: ASAN overrides Julia's SIGSEGV handler; "
"disable SIGSEGV handling or allow custom handlers.\n");
}

#endif

jl_init_threading();

jl_gc_init();
Expand Down

0 comments on commit 170a53e

Please sign in to comment.