RFR: 8229872: (fs) Increase buffer size used with getmntent

Alan Bateman Alan.Bateman at oracle.com
Tue Sep 3 19:23:12 UTC 2019


On 03/09/2019 19:58, Vladimir Kempik wrote:
> Hello.
> Looks reasonable.
> Just one question
> If I pass NativeBuffers.getNativeBuffer to getmntent and getmntent will decide to call realloc on that buffer.
> Will such NativeBuffer then be pointing to freed memory?
>
> If such NativeBuffer object gets destructed, will we get double free error?
>
Ah yes, you did mention the realloc in one of the earlier mails and that 
isn't going to work with NativeBuffer. In that case, let's go with that 
part of the patch and maybe a comment reminds the reader that it may 
realloc.

-Alan


More information about the nio-dev mailing list