[OpenJDK 2D-Dev] RFR: 8252100: NumberOverflow in class MemoryCache

Sergey Bylokhov serb at openjdk.java.net
Wed Sep 16 01:21:30 UTC 2020

On Tue, 15 Sep 2020 17:28:44 GMT, Phil Race <prr at openjdk.org> wrote:

>> Number overflow in javax/imageio/stream/MemoryCache.java
>> I tried to reproduce the issue but was not able to create stream or BufferedImage of such a large size because of array
>> size limitations. Submitter has mentioned simple fix for overflow which has solved his issue. I have verified the fix
>> by running jtreg and compatibility tests and there are no failures.
> If pos is big enough you could still theoretically have overflow, but this is still better.

You can try to create such images using some separate tools, BTW I have found one here(32768 × 32768):


PR: https://git.openjdk.java.net/jdk/pull/182

More information about the 2d-dev mailing list