United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6515373 Self referenced phi causes assert in falltrough case in RegionNode::Ideal
JDK-6515373 : Self referenced phi causes assert in falltrough case in RegionNode::Ideal

Details
Type:
Bug
Submit Date:
2007-01-19
Status:
Resolved
Updated Date:
2010-04-03
Project Name:
JDK
Resolved Date:
2007-01-31
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs10 (b07)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
Self referenced phi causes assert in falltrough case in RegionNode::Ideal():

 assert(dead->outcnt() == 0 && !dead->is_top(), "node must be dead");

The stack looks like:

  [3] PhaseIterGVN::remove_dead_node()
  [4] PhaseIterGVN::subsume_node()
  [5] RegionNode::Ideal()
  [6] PhaseIterGVN::transform_old()
  [7] PhaseIterGVN::optimize

The ideal case has found a phi with a single input and wants to replace it. The single input is itself!

 2644   Phi     ===  2641  2644

                                    

Comments
SUGGESTED FIX

We should check if phi->in(1)==phi and kill it in this case.
                                     
2007-01-19
EVALUATION

The assert is causes by this call where n == n->in(1):

  igv->subsume_node(n, n->in(1));
                                     
2007-01-19
SUGGESTED FIX

Webrev:                 http://prt-web.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2007/20070122112609.kvn.6515373/workspace/webrevs/webrev-2007.01.22/index.html
                                     
2007-01-22



Hardware and Software, Engineered to Work Together