Lookup.findStatic() triggers verification of nestmates attribute too early ?

David Holmes david.holmes at oracle.com
Wed Apr 15 22:48:49 UTC 2020


On 15/04/2020 11:34 pm, Harold Seigel wrote:
> Hi Remi,
> 
> An ASM example would be fine.
> 
> This is a hotspot issue, not core-dev.

Depends what part of the code is triggering a nestmate access check.

David

> Thanks, Harold
> 
> On 4/15/2020 9:27 AM, Remi Forax wrote:
>> ----- Mail original -----
>>> De: "Harold David Seigel" <harold.seigel at oracle.com>
>>> À: "valhalla-dev" <valhalla-dev at openjdk.java.net>
>>> Envoyé: Mercredi 15 Avril 2020 15:12:30
>>> Objet: Re: Lookup.findStatic() triggers verification of nestmates 
>>> attribute too early ?
>>> Hi Remi,
>>>
>>> Can you provide us with your failing test?
>> I will create a reproducer, but it involves generating bytecodes using 
>> ASM,
>> i can generate the faulty class and base64 encode it as a String ?
>>
>>> Also, did the failure occur with inline types or on a different repo?
>> It's more for the nestmate branch, but it's a jdk15 issue,
>> may be i should have reported that issue on core-dev ?
>>
>>> Thanks, Harold
>> Rémi
>>
>>> On 4/15/2020 8:41 AM, Remi Forax wrote:
>>>> Hi all,
>>>> i've discovered that using Lookup.findStatic() triggers the 
>>>> verification that
>>>> the attributes NestHost and the NestMembers are compatible.
>>>>
>>>> I believe it's a bug, the equivalent code using bytecodes will no 
>>>> trigger this
>>>> early verification, the verification is done lazily when a private 
>>>> member of a
>>>> class of the nest is accessed the first time.
>>>>
>>>> java.lang.IncompatibleClassChangeError: Type
>>>> jdk.incubator.vector.Cell$VectorizedBackend$Template/0x0000000800457840
>>>> (loader: 'bootstrap') is not a nest member of 
>>>> jdk.incubator.vector.IntVector
>>>> (loader: 'bootstrap'): current type is not listed as a nest member
>>>>          
>>>> java.base/java.lang.invoke.MethodHandleNatives.resolve(Native Method)
>>>>          
>>>> java.base/java.lang.invoke.MemberName$Factory.resolve(MemberName.java:1084) 
>>>>
>>>>          
>>>> java.base/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1111) 
>>>>
>>>>          [...]
>>>>
>>>> regards,
>>>> Rémi


More information about the valhalla-dev mailing list