# HG changeset patch # User kvn # Date 1285896705 25200 # Node ID 9a19ee0490e0d7c91a5a4f1591617d1eaa01463d # Parent bda2024ae52b15e96fbfcd5d7df998bbb0a3744d 6916062: assert(_inserts <= _insert_limit,"hash table overflow") in NodeHash::hash_insert Summary: Missing check for not empty worklist when puting memory node back on worklist and expecting address type update. Reviewed-by: never diff -r bda2024ae52b -r 9a19ee0490e0 src/share/vm/opto/memnode.cpp --- a/src/share/vm/opto/memnode.cpp Fri Oct 08 11:40:50 2010 -0400 +++ b/src/share/vm/opto/memnode.cpp Thu Sep 30 18:31:45 2010 -0700 @@ -256,7 +256,8 @@ if( t_adr == Type::TOP ) return NodeSentinel; // caller will return NULL if( can_reshape && igvn != NULL && - (igvn->_worklist.member(address) || phase->type(address) != adr_type()) ) { + (igvn->_worklist.member(address) || + igvn->_worklist.size() > 0 && (phase->type(address) != adr_type())) ) { // The address's base and type may change when the address is processed. // Delay this mem node transformation until the address is processed. phase->is_IterGVN()->_worklist.push(this); diff -r bda2024ae52b -r 9a19ee0490e0 src/share/vm/opto/phaseX.cpp --- a/src/share/vm/opto/phaseX.cpp Fri Oct 08 11:40:50 2010 -0400 +++ b/src/share/vm/opto/phaseX.cpp Thu Sep 30 18:31:45 2010 -0700 @@ -844,10 +844,33 @@ } #endif +#ifdef ASSERT + Node* prev = NULL; + uint rep_cnt = 0; +#endif + uint loop_count = 0; + // Pull from worklist; transform node; // If node has changed: update edge info and put uses on worklist. while( _worklist.size() ) { Node *n = _worklist.pop(); + if (++loop_count >= K * C->unique()) { + debug_only(n->dump(4);) + assert(false, "infinite loop in PhaseIterGVN::optimize"); + C->record_method_not_compilable("infinite loop in PhaseIterGVN::optimize"); + return; + } +#ifdef ASSERT + if (n == prev) { + if (++rep_cnt > 3) { + n->dump(4); + assert(false, "loop in Ideal transformation"); + } + } else { + rep_cnt = 0; + } + prev = n; +#endif if (TraceIterativeGVN && Verbose) { tty->print(" Pop "); NOT_PRODUCT( n->dump(); )