hg: jdk8/tl/jdk: 6910473: java.math.BigInteger.bitLength() may return negative "int" on large numbers; ...
brian.burkhalter at oracle.com
brian.burkhalter at oracle.com
Wed Oct 30 17:47:15 PDT 2013
Changeset: 0734e1584d9d
Author: bpb
Date: 2013-10-30 17:45 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0734e1584d9d
6910473: java.math.BigInteger.bitLength() may return negative "int" on large numbers
8021203: BigInteger.doubleValue/floatValue returns 0.0 instead of Infinity
8021204: Constructor BigInteger(String val, int radix) doesn't detect overflow
8022780: Incorrect BigInteger division because of MutableBigInteger.bitLength() overflow
Summary: Prevent construction of overflowed BigIntegers.
Reviewed-by: bpb, darcy, psandoz
Contributed-by: Dmitry Nadezhin <dmitry.nadezhin at oracle.com>
! src/share/classes/java/math/BigInteger.java
! src/share/classes/java/math/MutableBigInteger.java
+ test/java/math/BigInteger/BitLengthOverflow.java
+ test/java/math/BigInteger/DivisionOverflow.java
+ test/java/math/BigInteger/DoubleValueOverflow.java
! test/java/math/BigInteger/ExtremeShiftingTests.java
+ test/java/math/BigInteger/StringConstructorOverflow.java
+ test/java/math/BigInteger/SymmetricRangeTests.java
More information about the serviceability-dev
mailing list