Skip to content

Java 17, Records, Reflection: New Method or Constructor found as reachable after static analysis #4670

Answered by cstancu
ipsi asked this question in Q&A
Discussion options

You must be logged in to vote

That seems to be a bug in the heap scanning for analysis, it misses scanning the methodAccessor/constructorAccessor for a method/constructor. Then, the later scan from roots that builds the native image heap doesn't find the necessary metadata when reading this field. I don't think it is an agent bug, if the agent missed it would fail at run time with a different error. Can you share a complete reproducible?

Replies: 5 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@ipsi
Comment options

@cstancu
Comment options

@swaechter
Comment options

@cstancu
Comment options

@swaechter
Comment options

Answer selected by alina-yur
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@swaechter
Comment options

@visruth
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants