diff -r cc4f5f8d885e -r ac9cb1d5a202 src/share/vm/prims/jvmtiRedefineClasses.cpp --- a/src/share/vm/prims/jvmtiRedefineClasses.cpp Sun Oct 06 16:13:50 2013 +0200 +++ b/src/share/vm/prims/jvmtiRedefineClasses.cpp Mon Oct 07 12:20:28 2013 -0400 @@ -2755,13 +2755,26 @@ // InstanceKlass around to hold obsolete methods so we don't have // any other InstanceKlass embedded vtables to update. The vtable // holds the Method*s for virtual (but not final) methods. - if (ik->vtable_length() > 0 && ik->is_subtype_of(_the_class_oop)) { + // Default methods, or concrete methods in interfaces are stored + // in the vtable, so if an interface changes we need to check + // adjust_method_entries() for every InstanceKlass, which will also + // adjust the default method vtable indices. + // We also need to adjust any default method entries that are + // not yet in the vtable, because the vtable setup is in progress. + // This must be done after we adjust the default_methods and + // default_vtable_indices for methods already in the vtable. + if (ik->vtable_length() > 0 && (_the_class_oop->is_interface() + || ik->is_subtype_of(_the_class_oop))) { // ik->vtable() creates a wrapper object; rm cleans it up ResourceMark rm(_thread); ik->vtable()->adjust_method_entries(_matching_old_methods, _matching_new_methods, _matching_methods_length, &trace_name_printed); + ik->adjust_default_methods(_matching_old_methods, + _matching_new_methods, + _matching_methods_length, + &trace_name_printed); } // If the current class has an itable and we are either redefining an