-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
In some builds, the SEGV handler does not work until SIGFPE has been raised. We used to address this with the infamous "awful_sigfpe_hack", then at some later point testing showed it was no longer necessary. However, for me the problem is back:
julia> f(x)=f(x)
Methods for generic function f
f(Any,)
julia> f(2)
Segmentation fault (core dumped)
VS.
julia> div(1,0)
error: integer divide by zero
julia> f(x)=f(x)
Methods for generic function f
f(Any,)
julia> f(2)
error: stack overflow
By frobbing it a bit I found that setting up the signal handlers after loading the system image (in init.c) "fixes" the problem again. I don't understand this at all. It might have made sense that something was different after entering a signal handler (e.g. the signal mask, but I tried frobbing that too), but I don't know what is different this time. This is a mystery.