overflow behavior differs from other shells
Bug #1716980 reported by
Elliott Hughes
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mksh |
Invalid
|
Undecided
|
Unassigned |
Bug Description
$ mksh -c 'echo $((0x7fffffff + 1))'
-2147483648
versus:
$ dash -c 'echo $((0x7fffffff + 1))'
2147483648
$ bash -c 'echo $((0x7fffffff + 1))'
2147483648
$ busybox sh -c 'echo $((0x7fffffff + 1))'
2147483648
$ zsh -c 'echo $((0x7fffffff + 1))'
2147483648
To post a comment you must log in.
(this seen with R55 but also at least as far back as R46, so not a recent regression.)