Details
-
Bug
-
Resolution: Fixed
-
P4
-
8, 11, 17, 18
-
b13
-
generic
-
generic
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8281737 | 17.0.3 | Andrew Hughes | P4 | Resolved | Fixed | b02 |
JDK-8281760 | 15.0.7 | Andrew Hughes | P4 | Resolved | Fixed | b02 |
JDK-8281759 | 13.0.11 | Andrew Hughes | P4 | Resolved | Fixed | b02 |
JDK-8282033 | 11.0.15 | Andrew Hughes | P4 | Resolved | Fixed | b03 |
Description
if (bitLength(mag, mag.length) +
bitLength(val.mag, val.mag.length) >
32L*MAX_MAG_LENGTH) {
reportOverflow();
}
In the above, bitLength() returns 'int', hence the left operand of the '>' comparison is 'int' too, but the right operand of the '>' comparison is 'long' with value == Integer.MAX_VALUE + 1 hence this condition is always false.
Attachments
Issue Links
- backported by
-
JDK-8281737 Incorrect overflow test in Toom-Cook branch of BigInteger multiplication
- Resolved
-
JDK-8281759 Incorrect overflow test in Toom-Cook branch of BigInteger multiplication
- Resolved
-
JDK-8281760 Incorrect overflow test in Toom-Cook branch of BigInteger multiplication
- Resolved
-
JDK-8282033 Incorrect overflow test in Toom-Cook branch of BigInteger multiplication
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/d6bf0d1e
-
Commit openjdk/jdk13u-dev/359504c4
-
Commit openjdk/jdk15u-dev/e305f506
-
Commit openjdk/jdk17u-dev/8207e69a
-
Commit openjdk/jdk/d1aeca11
-
Review openjdk/jdk11u-dev/822
-
Review openjdk/jdk13u-dev/327
-
Review openjdk/jdk15u-dev/177
-
Review openjdk/jdk17u-dev/154
-
Review openjdk/jdk/5130