On 08/11/2013 11:32, Chris Hegarty wrote:
This is an interesting little product bug that was originally thought
to be a test stabilization issue, with
java/net/ipv6tests/BadIPv6Addresses.java.
Depending on the input/configuration/patch level getaddrinfo may try
to lookup a malformed IPv6 literal, and block for several seconds
waiting for a reply. The test, BadIPv6Addresses.java, tries to lookup
many bad addresses, and was appearing to hang in our test environments.
If a bad IPv6 literal is passed into getByName, then the
implementation should catch this early. It should not ever try to
lookup the given name in lookupAllHostAddr. There is already code in
getAllByName(String, InetAddress) to do this, there is just a bug in
the logic.
http://cr.openjdk.java.net/~chegar/8019834/webrev.00/
This looks okay to me. You might want to adjust the bug summary slightly
as UHE for bad IPv6 literal addresses is correct (it's just the hang due
to the lookup).
-Alan