RFR: 8256640: assert(!m->is_old() || ik()->is_being_redefined()) failed: old methods should not be in vtable
Jie Fu
jiefu at openjdk.java.net
Thu Nov 19 23:56:01 UTC 2020
On Thu, 19 Nov 2020 15:24:09 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> This is the patch for this failure but default methods could still get an old method if it's redefined while doing constraint checks. I'd like to take this bug.
>
> $ git diff
> diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
> index 4c720bb..fe7ac9e 100644
> --- a/src/hotspot/share/oops/instanceKlass.cpp
> +++ b/src/hotspot/share/oops/instanceKlass.cpp
> @@ -2577,6 +2577,10 @@ void InstanceKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handl
> // 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);
> }
Thanks @coleenp for fixing this bug.
Much have been learned.
Best regards,
Jie
-------------
PR: https://git.openjdk.java.net/jdk/pull/1313
More information about the hotspot-runtime-dev
mailing list