Open ivan-ristovic opened 2 years ago
Please add spring
label to this issue since it is impacting us.
Unfortunately I do not have the permissions to add labels, I hope someone else can do it.
Thanks for sharing this issue. A member of the Dev team will take a look into it shortly.
This issue affects Java SE 11 too, and causes failures in many JCK tests.
Object field offset is calculated during build and stored in the
offset
field ofTarget_java_lang_reflect_Field
substitution.jdk.internal.misc.Unsafe.objectFieldOffset
is substituted in the following way: https://github.com/oracle/graal/blob/d0577b6cb0b7fce7b96f9d1f1855c2b4fd3cddd9/substratevm/src/com.oracle.svm.reflect/src/com/oracle/svm/reflect/target/Target_jdk_internal_misc_Unsafe_Reflection.java#L73-L79This impementation is sensitive to reflection filters present in
jdk.internal.reflect.Reflection.fieldFilterMap
. There is at least one use-case forUnsafe.objectFieldOffset
that breaks on Java 17 because of the fieldClassLoader.classLoaderValueMap
being filtered forClassLoader
class (#3811, with #3940 as a temporary workaround).jdk.internal.misc.Unsafe.objectFieldOffset
substitution should be updated so that it does not use reflection.