review (XS) for 6938026: C2 compiler fails in Node::rematerialize()const

Tom Rodriguez tom.rodriguez at oracle.com
Mon Apr 12 13:46:26 PDT 2010


http://cr.openjdk.java.net/~never/6938026/

6938026: C2 compiler fails in Node::rematerialize()const
Reviewed-by:

This appears to be a long standing issue with OSR entry points.  If
ciTypeFlow proves that some local is null at the OSR entry it reports
TypePtr::NULL_PTR as its type.  Type::basic_type report T_ADDRESS for
NULL_PTR so fetch_interpreter_stacke thinks this local is a jsr/ret
address and emits a load that is typed as TypeRawPtr::BOTTOM but the
bytecodes think this is an oop of some kind.  Once this gets into the
graph it can cause the graph to collapse in funny ways, in this case
it allowed top into the final graph which causes us to die during
register allocation.  The bug is triggered because the use of an agent
in the program keeps more of the locals alive.  Without the use of the
agent this local would be dead in the case where it went wrong and
nothing would have happened.  As far as I can tell this has always
been an issue but it took the right bytecodes to expose it.  I was
unable to build a test case to expose the problem though asserts that
checked for NULL_PTR in OSR entry points found it to be pretty common.

src/share/vm/opto/parse1.cpp


More information about the hotspot-compiler-dev mailing list