1.1 --- a/src/share/vm/prims/jvmtiRedefineClasses.cpp Wed Jan 13 20:47:17 2016 -0500 1.2 +++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp Mon Jan 26 15:51:28 2015 -0800 1.3 @@ -3378,7 +3378,9 @@ 1.4 // not yet in the vtable, because the vtable setup is in progress. 1.5 // This must be done after we adjust the default_methods and 1.6 // default_vtable_indices for methods already in the vtable. 1.7 + // If redefining Unsafe, walk all the vtables looking for entries. 1.8 if (ik->vtable_length() > 0 && (_the_class_oop->is_interface() 1.9 + || _the_class_oop == SystemDictionary::misc_Unsafe_klass() 1.10 || ik->is_subtype_of(_the_class_oop))) { 1.11 // ik->vtable() creates a wrapper object; rm cleans it up 1.12 ResourceMark rm(_thread); 1.13 @@ -3393,7 +3395,9 @@ 1.14 // interface, then we have to call adjust_method_entries() for 1.15 // every InstanceKlass that has an itable since there isn't a 1.16 // subclass relationship between an interface and an InstanceKlass. 1.17 + // If redefining Unsafe, walk all the itables looking for entries. 1.18 if (ik->itable_length() > 0 && (_the_class_oop->is_interface() 1.19 + || _the_class_oop == SystemDictionary::misc_Unsafe_klass() 1.20 || ik->is_subclass_of(_the_class_oop))) { 1.21 // ik->itable() creates a wrapper object; rm cleans it up 1.22 ResourceMark rm(_thread);