6354181: nsk.logging.stress.threads.scmhml001 fails assertion in "src/share/vm/oops/instanceKlass.cpp, 111"

Reviewed-by: jrose, acorn
This commit is contained in:
Tom Rodriguez 2011-01-31 17:48:21 -08:00
parent 7b4f8073f0
commit f78d8f1157
4 changed files with 23 additions and 8 deletions

View file

@ -322,8 +322,14 @@ bool LoaderConstraintTable::check_or_update(instanceKlassHandle k,
klassOop LoaderConstraintTable::find_constrained_klass(Symbol* name,
Handle loader) {
LoaderConstraintEntry *p = *(find_loader_constraint(name, loader));
if (p != NULL && p->klass() != NULL)
if (p != NULL && p->klass() != NULL) {
if (Klass::cast(p->klass())->oop_is_instance() && !instanceKlass::cast(p->klass())->is_loaded()) {
// Only return fully loaded classes. Classes found through the
// constraints might still be in the process of loading.
return NULL;
}
return p->klass();
}
// No constraints, or else no klass loaded yet.
return NULL;