hotspot/src/share/vm/oops/klass.cpp
changeset 41060 c72f3248ea0c
parent 40655 9f644073d3a0
child 41183 207b92e69457
--- 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);
+      }
     }
   }
 }