Notes |
(0000740)
landley
12-07-05 22:08
|
Looking at fixing this, but a reproduction test case would be good. |
| |
(0000745)
dreamworks
12-08-05 03:20
|
ok, let's do it with a simple example:
(1) On current RHEL v4
mschoen@debug:/home/hindenburg/msc > expr 2147483647 + 1
2147483648
(2) within busybox
/ # /bin/expr 2147483647 + 1
-2147483648
So the bug is quite simple; the implementation uses unsigend int(32bit) which is not sufficient for modern systems, e.g. take the example mentioned above with size calculations for Installer Images with 120GByte Hard disks. |
| |
(0000880)
landley
01-08-06 21:12
|
This is really a feature request, and looking at expr it's fairly intrusive. (All the code has to be changed from int to long long, and that should really have a config option, and that should probably be a larger "use 64 bit math on 32 bit platforms" config option of some kind, and that's a design decision I'm putting off until at least 1.1.1.) |
| |
(0000881)
landley
01-08-06 21:14
|
Ok that's really a feature request, one that's pretty intrusive in this case (lots of individual "int" arguments need to be changed to "long long" or a typedef alternating between the two based on a config option, and there's a larger design issue that there should probably be some kind of global config option "use 64 bit math on 32 bit platforms" rather than just one for this app...
And in any case, I'm going to punt this past 1.1.0, which I'm trying to get out tomorrow. Maybe 1.1.1... |
| |
(0000882)
landley
01-08-06 21:18
|
I have no idea how to re-categorize a defect. (I really, really hate this bug system.) "expr uses 32 bit math on a 32 bit processor" is not a "severe defect" in an embedded system, it's a feature request for 64 bit math which some people will _not_ want. If I can't figure out how to recategorize, possibly I'll just close it out and either open a new one or more likely just put it on my personal todo list. But I'd rather not... |
| |
(0000999)
vodz
01-25-06 05:58
|
Ok. I added this as feature. See revision 13588. |
| |