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

Remi Forax forax at univ-mlv.fr
Wed Apr 15 12:41:14 UTC 2020


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