[9] [XS] RFR 8138819 : File descriptors leak during construction of selector

Alan Bateman Alan.Bateman at oracle.com
Mon Oct 5 13:24:53 UTC 2015


On 05/10/2015 14:08, Ivan Gerasimov wrote:
> Hello!
>
> When constructing different kinds of Selector, a pair of file 
> descriptors (the pipe ends) are created.
> If later in the constructor an exception is thrown, these will remain 
> open.
> Would you please help review the fix?
>
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8138819
> WEBREV: http://cr.openjdk.java.net/~igerasim/8138819/00/webrev/

(I've just changed the synopsis on this bug as the original synopsis was 
misleading. Can you use the new synopsis for the change-set message?).

The patch looks okay although if OOME is thrown then I assume the 
addSuppressed might fail. I was going to suggest we create the wrapper 
before the socket pair so that the rollback is one close rather than two 
but it's probably not worth it.

-Alan.




More information about the nio-dev mailing list