JDK-6359696 : Windows AMD64 Platform SDK build of hotspot with /O2 causes bogus exceptions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2003
  • CPU: x86
  • Submitted: 2005-12-06
  • Updated: 2012-10-08
  • Resolved: 2005-12-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u8Fixed 6 b66Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
When hotspot build 62/63 is built with the Windows AMD64/X64 Platform SDK (3790.1830) compiler (version 14.00.40310.41) at /O2, the build of the j2se fails.  Details to follow soon.

Currently the Build 63 makefile changes in hotspot will detect this newer compiler (14.00.40310.41) and drop the optimization level from /O2 to /O1, so to build hotspot with this compiler at /O2, you will need to go into file hotspot/build/windows/makefiles/compile.make and look for the lines:

!if "$(COMPILER_NAME)" == "VS2005"
# Reduced down from /O2 because of control build failures
PRODUCT_OPT_OPTION   = /O1
FASTDEBUG_OPT_OPTION = /O1
...

The above /O1 patterns needs to change to /O2.

NOTE: This 14.00.40310.41 compiler is considered a VS2005 (Visual Studio 2005) compiler. The older Platform SDK contained compiler 14.00.30701, which might appear to be VS2005 due to the "14" but is much closer to being VS2003 (13), so inside the hotspot makefiles this compiler is identified as MSC_VER=1399.

I'll add the exact circumstances of the build failure shortly... just trying to get this posted first.
FYI...

These changes did not make it into B63, they will go into B64, but they are in hotspot main/baseline.

Comments
EVALUATION On Windows AMD64, every generated call through native ABI needs to allocate the register save area required by the ABI. See comments for more detail.
14-12-2005