# HG changeset patch # User kvn # Date 1220646835 25200 # Node ID 4de0b4f7eae35acab15a04f704b4a527ed21545a # Parent 3fdc7f23127cc4e3e0b4042e496cbaa9b40cd63b 6676462: JVM sometimes would suddenly consume significant amount of memory Summary: Add asserts with dead loop checks in AddNode::Ideal(). Reviewed-by: never diff -r 3fdc7f23127c -r 4de0b4f7eae3 hotspot/src/share/vm/opto/addnode.cpp --- a/hotspot/src/share/vm/opto/addnode.cpp Thu Sep 04 09:03:16 2008 -0700 +++ b/hotspot/src/share/vm/opto/addnode.cpp Fri Sep 05 13:33:55 2008 -0700 @@ -157,6 +157,7 @@ Node *a12 = add1->in(2); const Type *t12 = phase->type( a12 ); if( t12->singleton() && t12 != Type::TOP && (add1 != add1->in(1)) ) { + assert(add1->in(1) != this, "dead loop in AddNode::Ideal"); add2 = add1->clone(); add2->set_req(2, in(2)); add2 = phase->transform(add2); @@ -173,6 +174,7 @@ Node *a22 = add2->in(2); const Type *t22 = phase->type( a22 ); if( t22->singleton() && t22 != Type::TOP && (add2 != add2->in(1)) ) { + assert(add2->in(1) != this, "dead loop in AddNode::Ideal"); Node *addx = add2->clone(); addx->set_req(1, in(1)); addx->set_req(2, add2->in(1));