JDK-6714406 : Node::dominates() does not always check for TOP
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs13
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-06-13
  • Updated: 2010-04-03
  • Resolved: 2008-06-19
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.
JDK 6 JDK 7 Other
6u14Fixed 7Fixed hs13Fixed
Related Reports
Relates :  
Description
Build error on windows-amd64 when trying to build 6u6p-b01/hs13-b02.  Here is an 
excerpt from the RE build log...

C:/BUILD_~1/jdk6_06/control/build/WINDOW~2/bin/javac -J-XX:ThreadStackSize=1536 -J-Xmx256m -J-Xms128m -XDprocess.packages -proc:only \
    -processor com.sun.tools.javac.sym.CreateSymbols \
    -Acom.sun.tools.javac.sym.Jar=C:/BUILD_~1/jdk6_06/control/build/WINDOW~2/tmp/rt-orig.jar \
    -Acom.sun.tools.javac.sym.Dest=C:/BUILD_~1/jdk6_06/control/build/WINDOW~2/symbols/META-INF/sym/rt.jar \
    java.applet java.awt java.awt.color java.awt.datatransfer java.awt.dnd java.awt.event java.awt.font java.awt.geom java.awt.im java.awt.im.spi java.awt.image java.awt.image.renderable java.awt.print java.beans java.beans.beancontext java.io java.lang java.lang.annotation java.lang.instrument java.lang.management java.lang.ref java.lang.reflect java.math java.net java.nio java.nio.channels java.nio.channels.spi java.nio.charset java.nio.charset.spi java.rmi java.rmi.activation java.rmi.dgc java.rmi.registry java.rmi.server java.security java.security.acl java.security.cert java.security.interfaces java.security.spec java.sql java.text java.text.spi java.util java.util.concurrent java.util.concurrent.atomic java.util.concurrent.locks java.util.jar java.util.logging java.util.prefs java.util.regex java.util.spi java.util.zip javax.accessibility javax.activation javax.activity javax.annotation javax.annotation.processing javax.crypto javax.crypto.interfaces javax.crypto.spec javax.imageio javax.imageio.event javax.imageio.metadata javax.imageio.plugins.jpeg javax.imageio.plugins.bmp javax.imageio.spi javax.imageio.stream javax.jws javax.jws.soap javax.lang.model javax.lang.model.element javax.lang.model.type javax.lang.model.util javax.management javax.management.loading javax.management.monitor javax.management.relation javax.management.openmbean javax.management.timer javax.management.modelmbean javax.management.remote javax.management.remote.rmi javax.naming javax.naming.directory javax.naming.event javax.naming.ldap javax.naming.spi javax.net javax.net.ssl javax.print javax.print.attribute javax.print.attribute.standard javax.print.event javax.rmi javax.rmi.CORBA javax.rmi.ssl javax.script javax.security.auth javax.security.auth.callback javax.security.auth.kerberos javax.security.auth.login javax.security.auth.spi javax.security.auth.x500 javax.security.cert javax.security.sasl javax.sound.sampled javax.sound.sampled.spi javax.sound.midi javax.sound.midi.spi javax.sql javax.sql.rowset javax.sql.rowset.serial javax.sql.rowset.spi javax.swing javax.swing.border javax.swing.colorchooser javax.swing.filechooser javax.swing.event javax.swing.table javax.swing.text javax.swing.text.html javax.swing.text.html.parser javax.swing.text.rtf javax.swing.tree javax.swing.undo javax.swing.plaf javax.swing.plaf.basic javax.swing.plaf.metal javax.swing.plaf.multi javax.swing.plaf.synth javax.tools javax.transaction javax.transaction.xa javax.xml.parsers javax.xml.bind javax.xml.bind.annotation javax.xml.bind.annotation.adapters javax.xml.bind.attachment javax.xml.bind.helpers javax.xml.bind.util javax.xml.soap javax.xml.ws javax.xml.ws.handler javax.xml.ws.handler.soap javax.xml.ws.http javax.xml.ws.soap javax.xml.ws.spi javax.xml.ws.wsaddressing javax.xml.transform javax.xml.transform.sax javax.xml.transform.dom javax.xml.transform.stax javax.xml.transform.stream javax.xml javax.xml.crypto javax.xml.crypto.dom javax.xml.crypto.dsig javax.xml.crypto.dsig.dom javax.xml.crypto.dsig.keyinfo javax.xml.crypto.dsig.spec javax.xml.datatype javax.xml.validation javax.xml.namespace javax.xml.xpath javax.xml.stream javax.xml.stream.events javax.xml.stream.util org.ietf.jgss org.omg.CORBA org.omg.CORBA.DynAnyPackage org.omg.CORBA.ORBPackage org.omg.CORBA.TypeCodePackage org.omg.stub.java.rmi org.omg.CORBA.portable org.omg.CORBA_2_3 org.omg.CORBA_2_3.portable org.omg.CosNaming org.omg.CosNaming.NamingContextExtPackage org.omg.CosNaming.NamingContextPackage org.omg.SendingContext org.omg.PortableServer org.omg.PortableServer.CurrentPackage org.omg.PortableServer.POAPackage org.omg.PortableServer.POAManagerPackage org.omg.PortableServer.ServantLocatorPackage org.omg.PortableServer.portable org.omg.PortableInterceptor org.omg.PortableInterceptor.ORBInitInfoPackage org.omg.Messaging org.omg.IOP org.omg.IOP.CodecFactoryPackage org.omg.IOP.CodecPackage org.omg.Dynamic org.omg.DynamicAny org.omg.DynamicAny.DynAnyPackage org.omg.DynamicAny.DynAnyFactoryPackage org.w3c.dom org.w3c.dom.events org.w3c.dom.bootstrap org.w3c.dom.ls org.xml.sax org.xml.sax.ext org.xml.sax.helpers com.sun.java.browser.dom org.w3c.dom org.w3c.dom.bootstrap org.w3c.dom.ls org.w3c.dom.ranges org.w3c.dom.traversal org.w3c.dom.html org.w3c.dom.stylesheets org.w3c.dom.css org.w3c.dom.events org.w3c.dom.views com.sun.management com.sun.security.auth com.sun.security.auth.callback com.sun.security.auth.login com.sun.security.auth.module com.sun.security.jgss com.sun.net.httpserver com.sun.net.httpserver.spi  javax.smartcardio com.sun.java.swing.plaf com.sun.java.swing.plaf.windows com.sun.java.swing.plaf.motif com.sun.java.swing.plaf.gtk com.sun.servicetag
warning: package com.sun.java.swing.plaf does not exist
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=\memnode.cpp:3784
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (C:\build_area\jdk6_06\hotspot\src\share\vm\opto\memnode.cpp:3784), pid=1804, tid=2076
#  Error: assert(alias_idx >= Compile::AliasIdxRaw || alias_idx == Compile::AliasIdxBot && Compile::current()->AliasLevel() == 0,"must avoid base_memory and AliasIdxTop")
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (13.0-b02-fastdebug mixed mode windows-amd64 )
# An error report file with more information is saved as:
# C:\build_area\jdk6_06\j2se\make\hs_err_pid1804.log
Java HotSpot(TM) 64-Bit Server VM warning: increase O_BUFLEN in ostream.hpp -- output truncated
VM option 'ThreadStackSize=1536'
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
gnumake[3]: *** [initial-image-jdk] Error 1
gnumake[3]: Leaving directory `C:/build_area/jdk6_06/j2se/make'
gnumake[2]: *** [j2se-build] Error 2
gnumake[2]: Leaving directory `C:/build_area/jdk6_06/control/make'
gnumake[1]: *** [generic_debug_build] Error 2
gnumake[1]: Leaving directory `C:/build_area/jdk6_06/control/make'
gnumake: *** [fastdebug_build] Error 2

Comments
EVALUATION So we merged two AddP (5439 and orig=[5682]) where 5439 became dead. It could happened in kill_dead_code() (node.cpp) where dead users are not killed aggressively but just put on IGVN worklist. Then if LoadP (5683) is first on the worklist we process it first before propagating deadness of AddP (5439). Then there is call to new method all_control_dominates() in find_previous_store() which incorrectly returned 'true' for [5683] LoadP === _ 5552 5439 since it is invalid that it dominates [5550] Initialize node. As result the flag 'known_independent' is set and the code which fails in find_previous_store() is executed. Before my changes detect_dominating_control() was only called when control edge of LoadP was not NULL. The problem with all_control_dominates() is it skips Proj/CatchProj nodes and take controls of Initialize and Allocate node without checking that it could be the original 'sub' node. As result, for example, all_control_dominates() will say that "[5552] Proj 5550" dominates "[5550] Initialize". he main problem was in Node::dominates(): if (sub == up && (sub->is_Loop() || sub->is_Region() && sub->req() != 3)) { // Take first valid path on the way up to 'this'. up = sub->in(1); // in(LoopNode::EntryControl); } else if (sub == up && sub->is_Region()) { The above code doesn't check that 'up' could be TOP for the case "[n] Region n 1 [n ...]". As result on the next iteration we get top->in(0) == Root() and wrong answer to return. After fixing it the test passed. The graph is weird since it is dead part of ideal graph.
14-06-2008