rxvt-unicode (and all children) ignore SIGFPE

Marc Lehmann schmorp at schmorp.de
Sun Jul 21 14:59:12 CEST 2013


On Sat, Jul 20, 2013 at 05:13:32PM -0400, Anders Kaseorg <andersk at MIT.EDU> wrote:
> My friend just ran across a problem where rxvt-unicode ignores SIGFPE, and 
> its child processes inherit this state, leading to undefined behavior.  

If it leads to undefined behaviour, it leads to undefined behaviour
regardless of what rxvt-unicode does - the undefined behaviour is solely
in the program then, hitting a SIGPFE condition without having a signal
handler installed (or having it set to SIG_DFL).

Additionally, note that most causes of SIGFPE in itself are undefined
behaviour - for example, dividing by zero results in undefined behaviour
regardless of the state of SIGFPE.

> This might eventually get fixed in Perl upstream, but it seems dangerous 
> enough that it’s probably worth adding a workaround in rxvt-unicode.

If it's dangerous, then those buggy programs need to be fixed, as the
undefined behaviour is in those programs, and not caused by urxvt. They
run into undefined behaviour regardless of who sets SIGFPE to SIG_IGN
(e.g. the libc could do that, or the kernel, and urxvt has no control over
that).

While rxvt-unicode could help work around these bugs, I doubt that the actual
resulting behaviour is that dangerous. If it really is, then those programs
need to be fixed with high urgency.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\




More information about the rxvt-unicode mailing list