[10] RFR (S): 8188145: MethodHandle resolution should follow JVMS sequence of lookup by name & type before type descriptor resolution

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue Dec 19 17:56:08 UTC 2017

Seems fine.


On 12/19/17 7:37 AM, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8188145/webrev.00
> https://bugs.openjdk.java.net/browse/JDK-8188145
> When resolving MethodHandle constants JVM eagerly resolves type 
> descriptor before doing upcall into JDK which performs method/field 
> resolution later (using MethodHandleNatives.resolve on symbolic 
> MemberName).
> The problem is that according to JVMS, member resolution (and all 
> exceptions it throws) should precede type descriptor resolution.
> Proposed fix does member & type descriptor resolution from JVM first and 
> then passes symbolic info into JDK (MHN.linkMethodHandleConstant).
> The fix is conservative, since JDK repeats method/field resolution on a 
> freshly created MemberName from symbolic info. But considering there are 
> additional security-sensitive checks on JDK side, I decided to leave all 
> optimizations for future enhancements.
> Testing: hs-precheckin-comp, hs-tier1, hs-tier2
> Best regards,
> Vladimir Ivanov

More information about the hotspot-runtime-dev mailing list