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 Aug 1, 2016
1 parent 410c615 commit 19fe5a4
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 19fe5a4

Please sign in to comment.