Message11982
I have had a quick look at this and it's kind of an edge case were i'm not sure if we should fix it.
The issue occurs in: org.python.core.stringlib.IntegerFormatter.format_d(int)
Where the minus sign is handled separate to the value itself. The value is then negated and passed to Java Integer.toString(-value). This is suposed to result in a positive sting representation. However in the edge case of passing in Integer.MIN_VALUE it results in "-2147483648". This can be demonstrated just in java see attached example.
The core of the problem is Integer.MIN_VALUE=-2^31 whereas Integer.MAX_VALUE=2^31-1 (https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html) so -Integer.MIN_VALUE doesn't fit in an int. |
|
Date |
User |
Action |
Args |
2018-05-15 22:23:04 | jamesmudd | set | messageid: <1526422984.34.0.682650639539.issue2672@psf.upfronthosting.co.za> |
2018-05-15 22:23:04 | jamesmudd | set | recipients:
+ jamesmudd, jeff.allen |
2018-05-15 22:23:04 | jamesmudd | link | issue2672 messages |
2018-05-15 22:23:03 | jamesmudd | create | |
|