On Thu, 8 Aug 2024 16:48:24 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
>> Possibly - if you made isIPv6Supported() in InetAddress.c return false, you >> might be able to see the issue in the same test that you observed failing >> without your change. >> >> InetAddress has a static block that will load the "net" library, and an >> other static block that will create the InetAddressImpl. It's a bit curious >> because I would expect the block that loads the "net" library to be executed >> before. >> >> And the only place where I see Inet6AddressImpl being used is in that second >> static block in InetAddress. >> >> I am not an expert on library loading though :-( > > Thanks for the suggestions. I will look into it. Without loading libnet in Inet6AddressImpl, the test java/net/InetAddress/NullCharInHostnameDriver.java fails with UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: 'java.net.InetAddress[] java.net.Inet6AddressImpl.lookupAllHostAddr(java.lang.String, int)' at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) at java.base/java.net.NullCharInHostname.main(NullCharInHostname.java:37) This is on Unix (Linux, macOS) only, not on Windows. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1710316659