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

Igor Veresov igor.veresov at oracle.com
Tue Apr 15 19:31:16 UTC 2014


Alright, I guess I was to paranoid and the fact that LCA dominates uses is proved by construction. Thanks for the answer.
Looks good. 

igor

On Apr 15, 2014, at 10:38 AM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:

> LCA by definition is common dominator of uses as it is calculated in compute_lca_of_uses(). It is guarantee to be reachable from uses. That is why I said such check is useless.
> 
> My changes do the check "that early dominates LCA".
> 
> Thanks,
> Vladimir
> 
> On 4/15/14 1:01 AM, Igor Veresov wrote:
>> Could you please explain why previous verification was useless? Would it make sense to verify both that LCA dominates uses, and that early dominates LCA?
>> 
>> igor
>> 
>> On Apr 14, 2014, at 7:36 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
>> 
>>> 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