United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6420685 : ResourceMark breaks growable array

Details
Type:
Bug
Submit Date:
2006-05-02
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2006-05-25
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0u6
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
The ResourceMark shown here is new in 1.5.0_06.  It is incorrect, in that calls to "get_ctrl" can call "_nodes.map" which is a growable array.  If the array DOES grow here, the then new storage will be allocated inside the ResourceMark, and reclaimed on exit from get_late_ctrl, leaving the _nodes data structure dangling.


//------------------------------get_late_ctrl----------------------------------
// Compute latest legal control.
Node *PhaseIdealLoop::get_late_ctrl( Node *n, Node *early ) {
 ResourceMark rm;              // Temp allocation
 assert(early != NULL, "early control should not be NULL");

                                    

Comments
SUGGESTED FIX

http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2006/20060509125806.nips.bug6420685/workspace/webrevs/webrev-2006.05.09/index.html
                                     
2006-05-10
EVALUATION

Removed ResourceMark.
                                     
2006-05-09



Hardware and Software, Engineered to Work Together