Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8240613: InstanceKlass::set_init_state failed with assert(good_state …
…|| state == allocated)

Reviewed-by: dcubed
  • Loading branch information
iklam committed Mar 8, 2020
1 parent 7806ca1 commit 046dcdc0bc14b8f27bd5e98a7166398b014acd23
Showing with 0 additions and 19 deletions.
  1. +0 −19 src/hotspot/share/classfile/systemDictionary.cpp
@@ -1260,25 +1260,6 @@ bool SystemDictionary::check_shared_class_super_type(InstanceKlass* child, Insta
bool is_superclass, TRAPS) {
assert(super_type->is_shared(), "must be");

// Quick check if the super type has been already loaded.
// + Don't do it for unregistered classes -- they can be unloaded so
// super_type->class_loader_data() could be stale.
// + Don't take the lock if loader data is NULL.
if (!super_type->is_shared_unregistered_class() && super_type->class_loader_data() != NULL) {
MutexLocker mu1(THREAD, SystemDictionary_lock);
// Read loader_data again inside the lock for thread safety
ClassLoaderData* loader_data = super_type->class_loader_data();
if (loader_data != NULL) {
Symbol* name = super_type->name();
Dictionary* dictionary = loader_data->dictionary();
unsigned int d_hash = dictionary->compute_hash(name);
if (SystemDictionary::find_class(d_hash, name, dictionary) != super_type) {
return true;
}
}
}

// Not sure if super type is loaded. Do it the slow way.
Klass *found = resolve_super_or_fail(child->name(), super_type->name(),
class_loader, protection_domain, is_superclass, CHECK_0);
if (found == super_type) {

0 comments on commit 046dcdc

Please sign in to comment.