src/share/vm/classfile/classLoaderData.cpp

changeset 4751
1fc4d4768b90
parent 4497
16fb9f942703
child 4866
16885e702c88
     1.1 --- a/src/share/vm/classfile/classLoaderData.cpp	Thu Mar 14 00:33:08 2013 -0700
     1.2 +++ b/src/share/vm/classfile/classLoaderData.cpp	Fri Mar 15 17:24:40 2013 -0400
     1.3 @@ -105,6 +105,7 @@
     1.4  void ClassLoaderData::classes_do(KlassClosure* klass_closure) {
     1.5    for (Klass* k = _klasses; k != NULL; k = k->next_link()) {
     1.6      klass_closure->do_klass(k);
     1.7 +    assert(k != k->next_link(), "no loops!");
     1.8    }
     1.9  }
    1.10  
    1.11 @@ -113,6 +114,7 @@
    1.12      if (k->oop_is_instance()) {
    1.13        f(InstanceKlass::cast(k));
    1.14      }
    1.15 +    assert(k != k->next_link(), "no loops!");
    1.16    }
    1.17  }
    1.18  
    1.19 @@ -258,6 +260,7 @@
    1.20        return;
    1.21      }
    1.22      prev = k;
    1.23 +    assert(k != k->next_link(), "no loops!");
    1.24    }
    1.25    ShouldNotReachHere();   // should have found this class!!
    1.26  }
    1.27 @@ -439,6 +442,7 @@
    1.28      while (k != NULL) {
    1.29        out->print_cr("klass "PTR_FORMAT", %s, CT: %d, MUT: %d", k, k->name()->as_C_string(),
    1.30            k->has_modified_oops(), k->has_accumulated_modified_oops());
    1.31 +      assert(k != k->next_link(), "no loops!");
    1.32        k = k->next_link();
    1.33      }
    1.34    }
    1.35 @@ -465,6 +469,7 @@
    1.36    for (Klass* k = _klasses; k != NULL; k = k->next_link()) {
    1.37      guarantee(k->class_loader_data() == this, "Must be the same");
    1.38      k->verify();
    1.39 +    assert(k != k->next_link(), "no loops!");
    1.40    }
    1.41  }
    1.42  

mercurial