RFR: JDK-8026245, , InetAddress.getLocalHost crash if IPv6 disabled (macosx)

Alan Bateman Alan.Bateman at oracle.com
Tue Oct 15 07:23:48 PDT 2013


On 15/10/2013 15:05, Rob McKenna wrote:
> Hi folks,
>
> Looking for a review for the following:
>
> http://cr.openjdk.java.net/~robm/8026245/webrev.01/
>
> It seems there were a number of issues with the original fix for 
> 7180557. This patch resolves those:
>
> - No existing net tests exercised the ipv4 only codepath
> - the extern to lookupIfLocalhost was in the wrong place
> - as a result of the prior review the call to lookupIfLocalhost was 
> moved to below the call to getaddrinfo. It was then decided to move it 
> back. Unfortunately the if (error) block was left in.
>
>     -Rob
Good to see this one figured out. For the extern then it might be better 
to put it near the top of the file, alternatively local to 
lookupAllHostAddr.

In Inet6AddressImpl.c then is ni_preferIPv6AddressID needed? It looks 
like it is only needed in the initialize function.

For the tests then I assume you mean -Djava.net.preferIPv4=true 
(preferIPv4 and preferIPv6 aren't used, to my knowledge anyway).

-Alan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20131015/38669ebd/attachment.html 


More information about the net-dev mailing list