[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash bug with ints beyond 2147483646
From: |
Chet Ramey |
Subject: |
Re: Bash bug with ints beyond 2147483646 |
Date: |
Thu, 04 Nov 2010 23:10:50 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 |
On 11/2/10 3:48 PM, Pete Gregory wrote:
> Even with a 64-bit kernel, under bash4.1-2 under ubuntu 10.04, problems exist
> with numbers beyond 2147483646.
>
> Easy duplication method:
> echo {2147483640..2147483646}
> reports
> 2147483640 2147483641 2147483642 2147483643 2147483644 2147483645 2147483646
> echo {2147483640..2147483647}
> dies with a malloc error
Thanks for the report. The problem was integer truncation. It will be
fixed in bash-4.2.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/