Stefan Hajnoczi writes: > On Mon, Jan 16, 2017 at 06:05:26PM +0100, Lluís Vilanova wrote: >> Stefan Hajnoczi writes: >> > On Mon, Dec 26, 2016 at 09:34:54PM +0100, Lluís Vilanova wrote: [...] >> >> + >> >> + } else { >> >> + /* proxy to next handler */ >> >> + if (segv_next.sa_sigaction != NULL) { >> >> + segv_next.sa_sigaction(signum, siginfo, sigctxt); >> >> + } else if (segv_next.sa_handler != NULL) { >> >> + segv_next.sa_handler(signum); >> >> + } >> >> > Is there a case when no signal handler was installed (i.e. default >> > action)? >> >> Yes, before calling hypertrace_init() or if it is called without a >> "hypertrace_base" argument set (i.e., the user has not enabled hypertrace in >> the >> command line).
> I meant "what happens if !segv_next.sa_action && > !segv_next.sa_handler?". The default signal disposition should take > effect. This code is ignoring that case, turning everything into > SIG_IGN but there is also SIG_DFL. I see, I didn't take SIG_DFL and SIG_IGN into account, and if both are null (no handler was installed by the user), I should cleanup my handler and raise() the signal again to let it go through its default system action. Sorry for the overall messy patch. Thanks, Lluis