[12] 8206403: ByteArrayOutputStream hugeCapacity method can return invalid capacity

Roger Riggs roger.riggs at oracle.com
Mon Jul 23 21:10:26 UTC 2018


Hi Brian,

You might want to add an @requires of 8Gb or whatever so the test only 
runs on a system it can succeed on.

I don't see the @randomness in the test.  (Other than perhaps available 
heap).

ByteArrayOutputStream:121: A message indicating the nature of the error 
would be useful.

In the test, I don't think you need to fill the array, writing 0 is just 
as good as 0xff.

Roger


On 7/23/18 4:34 PM, Brian Burkhalter wrote:
> https://bugs.openjdk.java.net/browse/JDK-8206403
> http://cr.openjdk.java.net/~bpb/8206403/webrev.00/
>
> Disallow creating an internal array of size larger than Integer.MAX_VALUE - 8.
>
> The change if approved as-is will require a CSR for the @implNote.
>
> Thanks,
>
> Brian



More information about the core-libs-dev mailing list