JDK-6420685 : ResourceMark breaks growable array
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 5.0u6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-05-02
  • Updated: 2010-04-02
  • Resolved: 2006-05-25
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
1.3.1_19Fixed 6 b85Fixed
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