Paul Eggert wrote: > At this point it would be better for integer arithmetic overflow to > generate SIGFPE in some way that a signal handler could tell the difference, > but > this is not a hill I'm prepared to die on and if it requires significantly > more > runtime library code or extra instructions in the executable I wouldn't > bother.
While glibc already documents that SIGFPE could be signalled for integer overflow, with code FPE_INTOVF_TRAP [1], I don't know how user-space code could generate such a signal: raise() doesn't take a second argument, and sigqueue() sets the code to SI_QUEUE, not FPE_INTOVF_TRAP. [2] Bruno [1] https://www.gnu.org/software/libc/manual/html_node/Program-Error-Signals.html [2] https://www.kernel.org/doc/man-pages/online/pages/man2/sigqueue.2.html