[12] 8206403: ByteArrayOutputStream hugeCapacity method can return invalid capacity
Brian Burkhalter
brian.burkhalter at oracle.com
Tue Jul 24 16:46:48 UTC 2018
Hi Roger,
I tend to agree with you. Also, I think that if MAX_ARRAY_SIZE were to be dealt with it should be so globally for consistency and not just in this one class.
Thanks for the follow up and the historical link (context).
Brian
On Jul 24, 2018, at 8:37 AM, Roger Riggs <roger.riggs at oracle.com> wrote:
> A followup on the issues raised by Martin.
>
> The original issue[1] was that the resize by doubling approach failed to take advantage
> of nearly 1G of potential buffer space.
> The new issue is raised against getting the last additional 2-6 bytes of buffer space before
> the hitting the VM's implementation limit.
>
> I don't think its worth the effort to try to ensure those last few bytes are available before throwing OOM.
> Reconsidering, I would close the issue as WillNotFix for the reason that the application is
> encountering an implementation limit.
>
> Regards, Roger
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8055949
More information about the core-libs-dev
mailing list