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

Vladimir Kempik vkempik at azul.com
Wed Sep 4 12:07:21 UTC 2019


Hello
Please review v5 of fix: http://cr.openjdk.java.net/~vkempik/8229872/webrev.05

diff vs v4:
moved getlinelen and rewind in UnixNativeDispatcher.c right after fclose.
changed getlinelen return type to jlong
slightly improved the comment about getlinelen and updated comments formatting in native part.

Thanks, Vladimir.

3 сент. 2019 г., в 22:23, Alan Bateman <Alan.Bateman at oracle.com<mailto:Alan.Bateman at oracle.com>> написал(а):

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190904/5324e692/attachment.html>


More information about the nio-dev mailing list