Bug in the Direct$Type$Buffer$RW$(int cap) constructor in src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template if the allocation of the cleaner fails
Alan Bateman
Alan.Bateman at oracle.com
Sun Oct 9 16:13:13 UTC 2022
On 03/10/2022 13:59, John Platts wrote:
> I have discovered a bug in the Direct$Type$Buffer$RW$(int cap)
> constructor if the allocation of the cleaner fails as memory will be
> leaked if an Exception or Error is thrown by the allocation of the
> Deallocator or the creation of the cleaner.
>
>
This mail was stuck, awaiting moderation as it was sent from a mail
account that is not subscribed to the list. Thank you for the report. If
allocating of the Cleaner were to fail with OOME or something else then
it would leak. It is tracked by JDK-8294717 [1] and has been fixed in
the main line for JDK 20.
-Alan
[1] https://bugs.openjdk.org/browse/JDK-8294717
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20221009/6ee58397/attachment.htm>
More information about the nio-dev
mailing list