[systemd-devel] BUG: several bugs in core/main.c (v218)

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Thu Jan 29 17:41:21 PST 2015

On Thu, Jan 29, 2015 at 09:54:57PM +0100, tomazzi wrote:
> To summarise: there are no bugs in core/main.c:
> 1. Ignoring return value from sigaction is not a problem, because
> it's almost *unlikely* to fail.
>   In any case, kernel will do the job, so it doesn't even matter
> whether the handlers are installed or not -> everything that can be
> done in the handler is to just quit anyway.
Actually the signal handler does sleep in an infinite loop, to not
crash the system.

> 2. SIGSEGV handler (and others): it's *unlikely* to happen that the
> handler will be executed at the bottom of the main stack (with
> insufficient stack space or when the stack is already overflowed) -
> because stacks are huge, and in case of segfault see point 1.
> 3. SA_NODEFER is OK, cause it's *unlikely* that external signal gets
> delivered.  Even if  the crash() handler will crash (f.e. because
> it's not re-entrant), what (again) is *unlikely* to happen, see
> point 1.

OK, great to hear that what we have currently should work :)


> I've learned a lot, sorry to waste Your time.
> Regards.

More information about the systemd-devel mailing list