3 ms·
$ bash --version GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu) ... $ echo $[263/-1] -263 What is it "supposed" (failure case) to do
by chrismorgan 14y ago
$ bash --version
GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)
...
$ echo $[263/-1]
-263
What is it "supposed" (failure case) to do?
- Dylan16807 14y agoBit by HN formatting. $ echo $[2**63/-1] Floating point exception Bash crashes out entirely because it doesn't check the operands are safe. See also http://kqueue.org/blog/2012/12/31/idiv-dos/ http://kqueue.org/blog/2012/12/31/idiv-dos/