Lookup.findStatic() triggers verification of nestmates attribute too early ?
harold.seigel at oracle.com
Wed Apr 15 13:34:43 UTC 2020
An ASM example would be fine.
This is a hotspot issue, not core-dev.
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
>> 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
>>> (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)
More information about the valhalla-dev