changeset 11966:882e8cda60b3

8156137: SIGSEGV in ReceiverTypeData::clean_weak_klass_links Summary: process previous versions in Klass::clean_weak_klass_links() Reviewed-by: coleenp, sspitsyn, stefank, dcubed
author dlong
date Wed, 31 Aug 2016 12:10:40 -0700
parents 79a147ebfdf2
children 715302110892
files src/share/vm/oops/klass.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/klass.cpp	Wed Aug 31 14:47:20 2016 +0300
+++ b/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);
+      }
     }
   }
 }