8212958: Allow Klass::_subklass and _next_sibling to have unloaded classes

Don't return unloaded klasses. Make sure access is protected by Compile_lock.

Reviewed-by: eosterlund, dlong
This commit is contained in:
Coleen Phillimore 2018-10-29 10:21:34 -04:00
parent 71637b00c7
commit 6a045adbed
16 changed files with 322 additions and 94 deletions

View file

@ -627,6 +627,7 @@ C2V_END
C2V_VMENTRY(jboolean, hasFinalizableSubclass,(JNIEnv *, jobject, jobject jvmci_type))
Klass* klass = CompilerToVM::asKlass(jvmci_type);
assert(klass != NULL, "method must not be called for primitive types");
MutexLocker ml(Compile_lock);
return Dependencies::find_finalizable_subclass(klass) != NULL;
C2V_END