Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: SIGFPE crash



On 2011-05-08 at 00:27 +0200, Mikael Magnusson wrote:
[ mod/modeq ]
> This is assuming we want to do this at all, I am told that only
> division will generate an exception on x86, but presumably other
> arches behave differently, and bash behaves the same way too
> (exception + die). Does some sort of standard have anything to say on
> the matter? I'm guessing someone has thought of it before and clearly
> nobody ever did anything about it.

At least in the INT_MIN case for integers, modulo arithmetic generates
this exception.

I checked, Exim has the same issue, http://bugs.exim.org/1112 filed,
referencing this thread.  From that:

% exim -be
> ${eval:-2147483648%-1}
zsh: floating point exception  exim -be

*sigh*

-Phil



Messages sorted by: Reverse Date, Date, Thread, Author