Implement MemberName interning.
There's a problem with initializing MemberNames.
MethodHandles::init_method_MemberName stores a reference to corresponding MemberName in InstanceKlass's MemberNameTable:
m->method_holder()->add_member_name(m->method_idnum(), mname);
But it's possible to create multiple MemberName instances for the same method and previously stored reference is overwritten.
It can lead to problems (likeJDK-8023004) during class redefinition.
Interning of MemberName instances should solve the problem.
There's a problem with initializing MemberNames.
MethodHandles::init_method_MemberName stores a reference to corresponding MemberName in InstanceKlass's MemberNameTable:
m->method_holder()->add_member_name(m->method_idnum(), mname);
But it's possible to create multiple MemberName instances for the same method and previously stored reference is overwritten.
It can lead to problems (like
Interning of MemberName instances should solve the problem.
- duplicates
-
JDK-8013267 move MemberNameTable from native code to Java heap, use to intern MemberNames
- Open
- relates to
-
JDK-8023004 JSR 292: java.lang.RuntimeException: Original target method was called.
- Resolved
-
JDK-8042235 redefining method used by multiple MethodHandles crashes VM
- Closed