https://bugs.winehq.org/show_bug.cgi?id=56065
Bug ID: 56065 Summary: Missing GetAnycastIpAddressTable() implementation Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: iphlpapi Assignee: wine-bugs@winehq.org Reporter: winehq@rastos.org Distribution: ---
Created attachment 75729 --> https://bugs.winehq.org/attachment.cgi?id=75729 patch adding empty implementation of GetAnycastIpAddressTable()
Right now the implementation of Win32 API function of GetAnycastIpAddressTable() is missing. I'm attaching a patch that adds dummy implementation of this function that returns "nothing found".
My motivation is that this function is used by OpenJDK 21 which seems to use the result (along with other information) to initialize secure random generator. Without implementation of GetAnycastIpAddressTable() any use of the random generator in java results in JVM crash.
Note: there is a very similar function GetUnicastIpAddressTable(). I assume that implementation of GetAnycastIpAddressTable() should be very similar. I attempted to follow up implementation of GetUnicastIpAddressTable() but it seems to be beyond my capabilities :-(. In first step because I'm unable to find and equivalent of macro NSI_IP_UNICAST_TABLE. So I would really appreciate if you could at least accept the attached patch.
https://bugs.winehq.org/show_bug.cgi?id=56065
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- How exactly do you reproduce the JVM crash?
https://bugs.winehq.org/show_bug.cgi?id=56065
--- Comment #2 from Rastislav Stanik winehq@rastos.org --- Created attachment 75745 --> https://bugs.winehq.org/attachment.cgi?id=75745 Java HotSpot crash log
How exactly do you reproduce the JVM crash?
Initially I narrowed the issue to running Java program like this:
import java.util.UUID;
public class UUIDTest { public static void main(String[] args) { UUID.randomUUID(); } }
with Adoptium OpenJDK.
$ wine64 c:/client/JRE/jdk-21+35/bin/java.exe -version openjdk version "21" 2023-09-19 LTS OpenJDK Runtime Environment Temurin-21+35 (build 21+35-LTS) OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode, sharing)
That produces a hotspot crash log attached here. It also shows the java callstack at the time of crash. It goes via sun.security.provider.SeedGenerator.getSystemEntropy(), sun.security.provider.SeedGenerator.addNetworkAdapterInfo() and java.net.NetworkInterface.getNetworkInterfaces()
Based on that I further narrowed it down to java.net.NetworkInterface.getNetworkInterfaces()
I.e. the test program can be reduced to
import java.net.NetworkInterface;
public class NetworkTest { public static void main(String[] args) { NetworkInterface.getNetworkInterfaces(); } }
That calls a private method java.net.NetworkInterface.getAll() which eventually calls getAddressTables() and that calls both GetUnicastIpAddressTable() and GetAnycastIpAddressTable() API - you can see that at https://github.com/adoptium/jdk21/blob/master/src/java.base/windows/native/l...
https://bugs.winehq.org/show_bug.cgi?id=56065
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |1bab7ea25e2c1e7bad6940c63c8 | |3ec0c1ef5c8f6 Status|UNCONFIRMED |RESOLVED CC| |infyquest@gmail.com Resolution|--- |FIXED
--- Comment #3 from Vijay Kamuju infyquest@gmail.com --- Your fix is now merged - https://source.winehq.org/git/wine.git/commit/1bab7ea25e2c1e7bad6940c63c83ec...
https://bugs.winehq.org/show_bug.cgi?id=56065
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.3.