RFR (XS) 8039050: Crash in C2 compiler at Node::rematerialize

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Apr 15 02:36:40 UTC 2014


http://cr.openjdk.java.net/~kvn/8039050/webrev/
Sorry JBS report is confidential:
https://bugs.openjdk.java.net/browse/JDK-8039050

Use node is not dominate by def node. Usually in such cases C2 crashes 
in build_loop_late_post(). In this case we have bad graph because 
control dead path did not collapse. It happened because some modified 
nodes during loop opts were not put on IGVN worklist.

Added missing record_for_igvn() call to insert_pre_post_loops() (the bug 
fix) and partial_peel(). These were 2 places where it was not called 
after loop cloning.

Added verification code to catch such situation. Fixed verification code 
(was broken) to compare controls of use and def nodes.
Currently the verification code compares controls of uses only - which 
is useless. :) That is why we never hit the problem in its format 
output. Also that code was called only from get_late_ctrl() which was 
not called for pinned nodes, like Phi nodes. And in the bug case it was 
Phi node. So now the verification will be called for all data nodes in 
debug VM.

In general we should use igvn.replace_input_of() and 
igvn.rehash_node_delayed() during Optimize. These methods put nodes on 
igvn worklist. I filed separate bug 8040213 to do the clean up.

Tested with jtreg, full ctw, jprt, failed test case.

Thanks,
Vladimir



More information about the hotspot-compiler-dev mailing list