mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8256640: assert(!m->is_old() || ik()->is_being_redefined()) failed: old methods should not be in vtable
Reviewed-by: lfoltan, dcubed, dholmes
This commit is contained in:
parent
c1407733c5
commit
fae68ff016
2 changed files with 24 additions and 5 deletions
|
@ -2571,15 +2571,21 @@ void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handl
|
|||
for (int index = 0; index < num_methods; ++index) {
|
||||
methods->at(index)->restore_unshareable_info(CHECK);
|
||||
}
|
||||
#if INCLUDE_JVMTI
|
||||
if (JvmtiExport::has_redefined_a_class()) {
|
||||
// Reinitialize vtable because RedefineClasses may have changed some
|
||||
// entries in this vtable for super classes so the CDS vtable might
|
||||
// point to old or obsolete entries. RedefineClasses doesn't fix up
|
||||
// vtables in the shared system dictionary, only the main one.
|
||||
// It also redefines the itable too so fix that too.
|
||||
// First fix any default methods that point to a super class that may
|
||||
// have been redefined.
|
||||
bool trace_name_printed = false;
|
||||
adjust_default_methods(&trace_name_printed);
|
||||
vtable().initialize_vtable(false, CHECK);
|
||||
itable().initialize_itable(false, CHECK);
|
||||
}
|
||||
#endif
|
||||
|
||||
// restore constant pool resolved references
|
||||
constants()->restore_unshareable_info(CHECK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue