RFR(M): 8059803 - Update use of GetVersionEx to get correct Windows version in hs_err files

Christian Tornqvist christian.tornqvist at oracle.com
Thu Oct 30 22:58:19 UTC 2014


>What does the new code do if you run it on WinXP? :-)

I haven't been able to find a Windows XP machine that is still up and
running, I did try a clean JDK9 build on Windows 2003 and it wouldn't start
(failed to launch due to some dependency). If it did start on Windows XP it
should print "Windows 5.1" :)

Thanks,
Christian

-----Original Message-----
From: Daniel D. Daugherty [mailto:daniel.daugherty at oracle.com] 
Sent: Thursday, October 30, 2014 6:40 PM
To: Christian Tornqvist
Cc: 'hotspot-runtime-dev'
Subject: Re: RFR(M): 8059803 - Update use of GetVersionEx to get correct
Windows version in hs_err files

 > http://cr.openjdk.java.net/~ctornqvi/webrev/8059803/webrev.00/

make/windows/makefiles/compile.make
     No comments.

src/os/windows/vm/os_windows.cpp
     No comments.

src/os/windows/vm/os_windows.hpp
     No comments.

src/share/tools/ProjectCreator/WinGammaPlatformVC10.java
     No comments.

Thumbs up.

Dan

P.S.
What does the new code do if you run it on WinXP? :-)


On 10/30/14 4:19 PM, Christian Tornqvist wrote:
> Hi everyone,
>
>   
>
> For the release of Windows 8.1, Microsoft changed the way GetVersionEx 
> works. Instead of reporting the actual OS version it depends on how 
> the application is manifested, I discovered this when running on 
> Windows 10 where it reported the OS being Windows 8.1.
>
>   
>
> I changed the code to query and base the OS detection code on the file 
> version of kernel32.dll (as suggested on MSDN). We do lose the service 
> pack level but I don't think that's the end of the world, especially 
> since we don't detect Windows 8/8.1 Updates using GetVersionEx anyway. 
> I added the full version of what we read from kernel32.dll after our 
> parsed version, example output from my Windows 8.1 x64 machine:
>
>   
>
> OS: Windows 8.1 , 64 bit Build 9600 (6.3.9600.17056)
>
>   
>
> Testing: Manual tested on all our supported versions of Windows (14 
> different versions) using hs_err information, Aurora adhoc run on 
> Windows 32/64bit and jprt
>
>   
>
> Webrev:
>
> http://cr.openjdk.java.net/~ctornqvi/webrev/8059803/webrev.00/
>
>   
>
> Bug:
>
> https://bugs.openjdk.java.net/browse/JDK-8059803
>
>   
>
> Thanks,
>
> Christian
>




More information about the hotspot-runtime-dev mailing list