Datagram socket leak (original) (raw)

Michael McMahon michael.x.mcmahon at oracle.com
Thu Sep 8 04:12:04 PDT 2011


On 07/09/11 21:54, chris hegarty wrote:

On 07/09/2011 17:24, Michael McMahon wrote:

Hi all,

I've posted a webrev for this at: http://cr.openjdk.java.net/~michaelm/7085981/webrev.1/ After checking Socket and ServerSocket, I believe they are not actually affected by this issue. The IllegalArgumentExceptions are thrown before the impl is created in both cases. Sorry Michael, I don't see this. It looks like the impl is create in the private Socket before bind is called, then bind can throw IAE. Or have I missed something. Actually, you're right (for Socket). I think ServerSocket is still ok. Trivially, the no-args constructor can call this(new InetSocketAddress(0)). I just noticed that these are the same. You mean for DatagramSocket. Yes, that makes sense. Updated both in this webrev

http://cr.openjdk.java.net/~michaelm/7085981/webrev.3/

Thanks, Michael.



More information about the net-dev mailing list