RFR [11] 8198358 : Align organization of DualStackPlainSocketImpl with TwoStacksPlainSocketImp [win]

Alan Bateman Alan.Bateman at oracle.com
Sun Mar 25 19:11:14 UTC 2018



On 25/03/2018 19:13, Ivan Gerasimov wrote:
> :
>
> In the code above, newfd was obtained from a call to accept() a few 
> lines before this check.
> So, the Java code has no way of being aware of this socket, and it 
> will never be closed unless we do it right here, before returning -1.
>
The SocketImpl's fd is set with this code:
   (*env)->SetIntField(env, socketFdObj, IO_fd_fdID, fd);

If there is any possibility of returning without a pending exception it 
will be registered with the cleaner.

At this point, I think we have to treat all code calling NET_SocketClose 
as a suspect until the regression is tracked down.

-Alan


More information about the net-dev mailing list