[exim-dev] [Bug 1112] New: ${eval:INT_MIN/-1} gives SIGFPE

Página Inicial
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
Para: exim-dev
Assunto: [exim-dev] [Bug 1112] New: ${eval:INT_MIN/-1} gives SIGFPE
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1112
           Summary: ${eval:INT_MIN/-1} gives SIGFPE
           Product: Exim
           Version: 4.76 RC1
          Platform: x86-64
        OS/Version: All
            Status: NEW
          Severity: bug
          Priority: medium
         Component: String expansion
        AssignedTo: pdp@???
        ReportedBy: pdp@???
                CC: exim-dev@???



In zsh-workers/29178 Jon Mayo reported that zsh gets a SIGFPE with:
echo $[-9223372036854775808/-1]

In light of the recent /0 issue in bug 1102, I investigated if Exim has a
similar issue. It does, using INT_MIN instead of LLONG_MIN.

% exim -be
> ${eval:0x7fffffff}

2147483647
> ${eval:-0x7fffffff}

-2147483647
> ${eval:-0x7fffffff-1}

-2147483648
> ${eval:-0x7fffffff-2}

2147483647
> ${eval:-2147483648/-1}

zsh: floating point exception exim -be

Crap.

In the zsh-workers thread, when discussing whether or not mod should be handled
too (as we did in a follow-up within bug 1102) Mikael Magnusson noted "I am
told that only division will generate an exception on x86"; that might be
constrained to the llong integers, since:

% exim -be
> ${eval:-2147483648%-1}

zsh: floating point exception exim -be


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email