6736417: Fastdebug C2 crashes in StoreBNode::Ideal

The result of step_through_mergemem() and remove_dead_region() is not checked in some cases.

Reviewed-by: never
This commit is contained in:
Vladimir Kozlov 2008-08-27 09:15:46 -07:00
parent 26c780da72
commit 37306315b2
6 changed files with 32 additions and 13 deletions

View file

@ -986,7 +986,9 @@ Node *PhaseIterGVN::transform_old( Node *n ) {
// Apply the Ideal call in a loop until it no longer applies
Node *k = n;
DEBUG_ONLY(dead_loop_check(k);)
DEBUG_ONLY(bool is_new = (k->outcnt() == 0);)
Node *i = k->Ideal(this, /*can_reshape=*/true);
assert(i != k || is_new || i->outcnt() > 0, "don't return dead nodes");
#ifndef PRODUCT
if( VerifyIterativeGVN )
verify_step(k);
@ -1024,7 +1026,9 @@ Node *PhaseIterGVN::transform_old( Node *n ) {
}
DEBUG_ONLY(dead_loop_check(k);)
// Try idealizing again
DEBUG_ONLY(is_new = (k->outcnt() == 0);)
i = k->Ideal(this, /*can_reshape=*/true);
assert(i != k || is_new || i->outcnt() > 0, "don't return dead nodes");
#ifndef PRODUCT
if( VerifyIterativeGVN )
verify_step(k);