RFR 9/8: 8066504: GetVersionEx in java.base/windows/native/libjava/java_props_md.c might not get correct Windows version
Alan Bateman
Alan.Bateman at oracle.com
Wed Jun 17 11:32:41 UTC 2015
On 15/06/2015 22:58, Roger Riggs wrote:
> Please review code for Windows 10 that sets the System properties for
> os.name and os.version
> from the version of kernel32.dll. The update uses the same technique
> used by Hotspot
> in src/os/windows/vm/os_windows.cpp.
>
> The Windows link of CoreLibraries.gmk includes version.lib/dll.
>
> The behavior of GetVersionEx has changed so it reports whatever
> version the application
> asserts it is compatible with instead of the current version of Windows.
> See:
> https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx
>
> The same change is desirable for 8u60.
>
> Webrev:
> http://cr.openjdk.java.net/~rriggs/webrev-win-ver-8066504/
Is it time to use the new version helper APIs and move away from
GetVersionEx?
I don't object to looking at the file version of kernel32.dll but I
would think we should be looking to replace it soon (in hotspot too).
Also, is there any update needed in src/windows/resource/java.manifest?
In passing, GetNativeSystemInfo has been in Windows since Windows XP so
I don't think we need to use GetModuleHandle to get the address now.
-Alan
More information about the build-dev
mailing list