-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Native Image] ImageLayerLoader unable to restore state of annotations #10101
Comments
Hi, this PR should fix this issue for a lot of cases #10100. However, some annotation members (arrays, classes or other annotations) still cannot be correctly loaded. |
Awesome, thank you! Will test it soon - it might be good enough to keep exploring further. |
@Zeavee thanks that looks like progress indeed!
|
This should be fixed by 1a5e49e. |
Describe the Issue
When
ImageLayerLoader#createBaseLayerMethod
is loading the layer's methodData it's defining annotations as well, but these annotations seem lacking their attributes.In some cases not having these values leads to critical failures; for example GraalVM itself makes use of the annotation
com.oracle.svm.core.AlwaysInline
which strictly requires a value for its main attribute. This is used, for example, inTarget_jdk_internal_foreign_SegmentFactories
.The lack of this attribute leads to the annotation being invalid, which in turn results in a critical compilation error:
I do also wonder what other problems are likely going to be caused by this, I believe many of our frameworks would need to read the actual annotation attributes; it seems that the current code would fallback to their default values, which is not correct.
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
Built from
e238132d615da50c4d380c76dbe548caf94e5834
Operating System and Version
Fedora Linux 41
Build Command
Core layer preparation:
Failing build:
Expected Behavior
To be able to use annotations as usual.
Actual Behavior
Failed build
Steps to Reproduce
I hope the description I provided is clear enough as I pointed to the specific code which is problematic.
Additional Context
No response
Build Log Output and Error Messages
No response
The text was updated successfully, but these errors were encountered: