For a number of classes that primarily use APIs from different areas of JavaSE,
when trying to create AOT cache from AOT config getting the following:
[0.748s][warning][cds,heap ] Archive heap points to a static field that may hold a different value at runtime:
[0.748s][warning][cds,heap ] Field: java/lang/invoke/MethodHandleImpl$BindCaller::CD_Object_array
[0.748s][warning][cds,heap ] Value: jdk.internal.constant.ArrayClassDescImpl
[0.748s][warning][cds,heap ] {0x00000000c00dfb70} - klass: 'jdk/internal/constant/ArrayClassDescImpl' - flags:
[0.748s][warning][cds,heap ]
[0.748s][warning][cds,heap ] - ---- fields (total size 3 words):
[0.748s][warning][cds,heap ] - private final 'rank' 'I' @12 1 (0x00000001)
[0.748s][warning][cds,heap ] - private final 'elementType' 'Ljava/lang/constant/ClassDesc;' @16 a 'jdk/internal/constant/ClassOrInterfaceDescImpl'{0x00000000c00dece0} (0xc00dece0)
[0.748s][warning][cds,heap ] - private 'cachedDescriptorString' 'Ljava/lang/String;' @20 "[Ljava/lang/Object;"{0x00000000c0004be0} (0xc0004be0)
[0.748s][warning][cds,heap ] --- trace begin ---
[0.748s][warning][cds,heap ] [ 0] {0x00000000c00e10b0} jdk.internal.constant.DirectMethodHandleDescImpl::invocationType (offset = 24)
[0.748s][warning][cds,heap ] [ 1] {0x00000000c00e1098} jdk.internal.constant.MethodTypeDescImpl::argTypes (offset = 16)
[0.748s][warning][cds,heap ] [ 2] {0x00000000c00e1070} [Ljava.lang.constant.ClassDesc; @[4]
[0.748s][warning][cds,heap ] [ 3] {0x00000000c00dfb70} jdk.internal.constant.ArrayClassDescImpl
[0.748s][warning][cds,heap ] --- trace end ---
[0.748s][warning][cds,heap ]
[0.749s][error ][cds,heap ] Scanned 20426 objects. Found 1 case(s) where an object points to a static field that may hold a different value at runtime.
[0.749s][error ][cds,heap ] Please see cdsHeapVerifier.cpp and aotClassInitializer.cpp for details
[0.749s][error ][cds ] An error has occurred while writing the shared archive file.
Not seeing the issue when using -XX:-AOTClassLinking additionally
when trying to create AOT cache from AOT config getting the following:
[0.748s][warning][cds,heap ] Archive heap points to a static field that may hold a different value at runtime:
[0.748s][warning][cds,heap ] Field: java/lang/invoke/MethodHandleImpl$BindCaller::CD_Object_array
[0.748s][warning][cds,heap ] Value: jdk.internal.constant.ArrayClassDescImpl
[0.748s][warning][cds,heap ] {0x00000000c00dfb70} - klass: 'jdk/internal/constant/ArrayClassDescImpl' - flags:
[0.748s][warning][cds,heap ]
[0.748s][warning][cds,heap ] - ---- fields (total size 3 words):
[0.748s][warning][cds,heap ] - private final 'rank' 'I' @12 1 (0x00000001)
[0.748s][warning][cds,heap ] - private final 'elementType' 'Ljava/lang/constant/ClassDesc;' @16 a 'jdk/internal/constant/ClassOrInterfaceDescImpl'{0x00000000c00dece0} (0xc00dece0)
[0.748s][warning][cds,heap ] - private 'cachedDescriptorString' 'Ljava/lang/String;' @20 "[Ljava/lang/Object;"{0x00000000c0004be0} (0xc0004be0)
[0.748s][warning][cds,heap ] --- trace begin ---
[0.748s][warning][cds,heap ] [ 0] {0x00000000c00e10b0} jdk.internal.constant.DirectMethodHandleDescImpl::invocationType (offset = 24)
[0.748s][warning][cds,heap ] [ 1] {0x00000000c00e1098} jdk.internal.constant.MethodTypeDescImpl::argTypes (offset = 16)
[0.748s][warning][cds,heap ] [ 2] {0x00000000c00e1070} [Ljava.lang.constant.ClassDesc; @[4]
[0.748s][warning][cds,heap ] [ 3] {0x00000000c00dfb70} jdk.internal.constant.ArrayClassDescImpl
[0.748s][warning][cds,heap ] --- trace end ---
[0.748s][warning][cds,heap ]
[0.749s][error ][cds,heap ] Scanned 20426 objects. Found 1 case(s) where an object points to a static field that may hold a different value at runtime.
[0.749s][error ][cds,heap ] Please see cdsHeapVerifier.cpp and aotClassInitializer.cpp for details
[0.749s][error ][cds ] An error has occurred while writing the shared archive file.
Not seeing the issue when using -XX:-AOTClassLinking additionally
- relates to
-
JDK-8354890 AOT-initialize j.l.i.MethodHandleImpl and inner classes
-
- New
-