8156137: SIGSEGV in ReceiverTypeData::clean_weak_klass_links
Summary: process previous versions in Klass::clean_weak_klass_links()
Reviewed-by: coleenp, sspitsyn, stefank, dcubed
--- a/hotspot/src/share/vm/oops/klass.cpp Wed Aug 31 14:47:20 2016 +0300
+++ b/hotspot/src/share/vm/oops/klass.cpp Wed Aug 31 12:10:40 2016 -0700
@@ -431,6 +431,12 @@
if (clean_alive_klasses && current->is_instance_klass()) {
InstanceKlass* ik = InstanceKlass::cast(current);
ik->clean_weak_instanceklass_links(is_alive);
+
+ // JVMTI RedefineClasses creates previous versions that are not in
+ // the class hierarchy, so process them here.
+ while ((ik = ik->previous_versions()) != NULL) {
+ ik->clean_weak_instanceklass_links(is_alive);
+ }
}
}
}