RFR: 8364655: Loading class with nested annotations causes stack overflow in VM

Chen Liang liach at openjdk.org
Tue Dec 16 23:43:47 UTC 2025


On Tue, 16 Dec 2025 22:13:46 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Or are we worried that user-defined annotations may ultimately use `@Deprecated` and that will be missed if the nesting is too deep?

Yes, unforunately the annotation format does not allow us to skip a superlong annotation. We must expand all annotations in an array completely to access any single annotation. So if a `@Deprecated` is after a super-deep annotation chain, it would be skipped by the algorithm in this patch.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28674#issuecomment-3662910014


More information about the hotspot-runtime-dev mailing list