hotspot/src/share/vm/oops/klass.cpp
changeset 9172 a4e13ccafc44
parent 8921 14bfe81f2a9d
child 11430 718fc06da49a
child 11480 1bf714e8adb4
--- a/hotspot/src/share/vm/oops/klass.cpp	Thu Apr 14 23:06:33 2011 -0400
+++ b/hotspot/src/share/vm/oops/klass.cpp	Fri Apr 15 09:36:28 2011 -0400
@@ -453,6 +453,14 @@
       ik->unlink_class();
     }
   }
+  // Clear the Java vtable if the oop has one.
+  // The vtable isn't shareable because it's in the wrong order wrt the methods
+  // once the method names get moved and resorted.
+  klassVtable* vt = vtable();
+  if (vt != NULL) {
+    assert(oop_is_instance() || oop_is_array(), "nothing else has vtable");
+    vt->clear_vtable();
+  }
   set_subklass(NULL);
   set_next_sibling(NULL);
 }