United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6488751 hotspot should be compatible with VS2005 build
JDK-6488751 : hotspot should be compatible with VS2005 build

Details
Type:
Bug
Submit Date:
2006-11-01
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2006-12-02
Component:
hotspot
OS:
windows
Sub-Component:
runtime
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs10 (b03)

Related Reports
Backport:
Backport:

Sub Tasks

Description
Numerous errors prevent building of the hotspot using the MS VS2005 C++ compiler (included in the free MS VS 2005 Express Edition).

1. src/share/vm/adlc/main.cpp(393):
It was necessary to comment out the void *operator new( size_t size, int, const char *, int ) definition, as the C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\crtdbg.h already provides an implementation for this operator. It should probably be put under the #if statement depending on the VS version used.

2. src\os\win32\vm\perfMemory_win32.cpp(525)
The variable first_colon defined on this line (in the is_filesystem_secure() function) should be 'const char*', not just 'char *'.

3. src\share\vm\code\compressedstream.cpp(182)  
Compiler reported the following error message while compiling the fastdebug version of the hotspot (as the block the error appears in is guarded with the #ifndef PRODUCT statement):
****************
fatal error C1063: compiler limit : compiler stack overflow
Internal Compiler Error in c:\Progra~1\MID05A~1\VC\bin\cl.exe.  You will be 
prompted to send an error report to Microsoft later.
****************
No idea how this issue could be fixed...

4. There're lots of the following warnings generated:
*****************
see declaration of 'sprintf'
        Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.' 
*****************
As the hotspot is to be built with the /WX option on, these warnings cause the build to fail. It's supposed that these CRT function calls should be changed to use more secure CRT functions.

The CR may be divided into separate sub-CRs to make the changes more atomic if it makes any sense.

                                    

Comments
WORK AROUND

1. Throw away the /WX option from the makefile.
2. Perform the changes suggested in the description (the issue #3 was poorly solved commenting out the problematic code as the fastdebug version was not required for the 'proof of concept' build).
With these changes the hotspot builds ok using the VS 2005 Express Edition.
                                     
2006-11-01
EVALUATION

Fix per description.
                                     
2006-11-09



Hardware and Software, Engineered to Work Together