-
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
Type mismatch in ObjectStreamClass$Caches.localDescs with native image built with latest JDK 17 #4477
Comments
To be more specific, this affects JDK 17.0.4+. |
I'm trying to fix this, please assign it to me. |
FTR the same issue appears with jdk11u-dev (openjdk/jdk11u-dev@118ec61) and will affect |
Ah yes, good point. The conditionals need to take that into account too. |
One clarification: By |
Correct, thanks for catching this :) |
I ran into this while looking into making Native Image work on JDK 19. I have attached the untested patch I came up with so far in case it helps: |
Here's a summary of a quick chat with Doug:
I'll adjust my PR to reflect this. |
The negation function won't work because annotation values need to be constants. |
@dougxc this makes sense but I am concerned it might result in silently not substituting something we should be substituting because the supplier just returns false... We've been bitten by that in quarkus, see quarkusio/quarkus#24768 (comment) I think it's preferable for GraalVM to crash if we expect it to find a specific class or element in the JDK and it fails, instead of having it silently ignore it. A class or element changing or getting removed from JDK is something that requires our immediate attention in order to ensure the substitutions are still functioning as expected. |
I understand your concern. That's exactly why we introduced JDK version specific checks in |
No, since in this case there are substitutions for both outcomes of the supplier, I find it highly unlikely to go wrong silently. |
GraalVM master native image fails when built with the very latest JDK 17 code. It throws an error like this:
This is caused by the commit in openjdk/jdk17u-dev@7d132f5.
GraalVM has a subsitution like this:
But the JDK 17 API has changed and the type of
localDescs
is nowClassCache
instead ofConcurrentMap
.The text was updated successfully, but these errors were encountered: