RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v2]
Jaikiran Pai
jai.forums2013 at gmail.com
Thu Jul 1 09:13:35 UTC 2021
Thank you Alan and Lance. I'll update this PR shortly with the proposed
approach.
-Jaikiran
On 01/07/21 2:13 pm, Alan Bateman wrote:
> On 30/06/2021 17:15, Jaikiran Pai wrote:
>>
>> I understand that Alan's suggestion holds good and we should have
>> some logic in place which switches to using a temp file once we
>> notice that the sizes we are dealing with can exceed some threshold,
>> but I guess that is something we need to do separately outside of
>> this PR?
>
> My comment was mostly just to point out that it's only a partial fix
> and it will eventually fail with an OOME once the deflated size is too
> big for the BAOS. I don't have a strong opinion on whether the
> complete fix is done in one, two or many PRs but I think the first
> step could be to use the "useTempFile" path when the entry size is
> larger than some (10s of MB?) threshold.
>
> -Alan
More information about the nio-dev
mailing list