According to the C Standard, 7.14.1.1 [ISO/IEC 9899:2011], if a signal handler returns when it has been entered as a result of a computational exception (that is, with the value of its argument of SIGFPE
, SIGILL
,
, or any other implementation-defined value corresponding to such an exception) returns, then the behavior is undefined. (see See undefined behavior 130.).SIGSEGV
The Portable Operating System Interface (POSIX®), Base Specifications, Issue 7 [IEEE Std 1003.1:2013], adds SIGBUS
to the list of computational exception signal handlers,:
The behavior of a process is undefined after it returns normally from a signal-catching function for a
SIGBUS
,SIGFPE
,SIGILL
, orSIGSEGV
signal that was not generated bykill()
,sigqueue()
, orraise()
.
Do not return from SIGFPE
, SIGILL
,
, or any other implementation-defined value corresponding to a computational exception, such as SIGSEGV
SIGBUS
on POSIX systems, regardless of how the signal was generated.
...