United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6977924 Changes for 6975078 produce build error with certain gcc versions
JDK-6977924 : Changes for 6975078 produce build error with certain gcc versions

Details
Type:
Bug
Submit Date:
2010-08-18
Status:
Closed
Updated Date:
2011-04-23
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
linux
Sub-Component:
gc
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs19 (b06)

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
The changes introduced for 6975078 assign badHeapOopVal to the _allocation field in the ResourceObj class. In 32 bit linux builds with certain versions of gcc this assignment will be flagged as an error while compiling allocation.cpp. In 32 bit build the constant value (which is cast to an intptr_t) is negative. The _allocation field is typed an and unsigned intptr_t and gcc catches this.

                                    

Comments
SUGGESTED FIX

Explicitly cast badHeapOopVal to unsigned.
                                     
2010-08-18
EVALUATION

See description.
                                     
2010-08-18
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/413ad0331a0c
                                     
2010-08-19



Hardware and Software, Engineered to Work Together