diff -r 6f019652dd5e -r c72f3248ea0c hotspot/src/share/vm/oops/klass.cpp --- 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); + } } } }