bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can arithmetic evaluation trap more than just division by zero?


From: Roman Rakus
Subject: Re: Can arithmetic evaluation trap more than just division by zero?
Date: Tue, 06 Apr 2010 14:21:05 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Lightning/1.0b2pre Thunderbird/3.0.4

On 04/06/2010 01:49 PM, Greg Wooledge wrote:
On Tue, Apr 06, 2010 at 01:29:28PM +0200, Roman Rakus wrote:
Is it possible to add more traps to arithmetic evaluation?
Repeated by:
$((2 ** 63 / -1))

Actual result:
SIGFPE (not catched)

Initial report is https://bugzilla.redhat.com/show_bug.cgi?id=579622
Hmm, I don't get that.

imadev:~$ uname -sr; echo $BASH_VERSION
HP-UX B.10.20
4.1.2(2)-release
imadev:~$ echo $((2 ** 63 / -1))
-9223372036854775808

arc3:~$ uname -sr; echo $BASH_VERSION
Linux 2.6.26-2-686
3.2.39(1)-release
arc3:~$ echo $((2 ** 63 / -1))
-9223372036854775808


I can reproduce it in 4.1.2(1)-release and 4.0.23(1)-release on x86_64 GNU/Linux. I didn't try on bash 3.2.
RR




reply via email to

[Prev in Thread] Current Thread [Next in Thread]