RFR: 8349009: JVM fails to start when AOTClassLinking is used with unverifiable old classes [v4]
John R Rose
jrose at openjdk.org
Thu Jan 30 11:20:48 UTC 2025
On Thu, 30 Jan 2025 06:16:38 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> During the testing of [JDK-8348752](https://bugs.openjdk.org/browse/JDK-8348752), we notice test failures caused by unverifiable old classes (i.e., classes with bad instructions and major version < 50).
>>
>> The fix is simple. Simply exclude unlinked classes from the AOTCache when `-XX:+AOTClassLinking` is enabled.
>>
>> Verified with JCK.
>>
>> NOTE: I have to exclude some old CDS tests from test tasks that add the `-XX:+AOTClassLinking` flag. These test cases assume that **verifiable but unlinked** classes are archived. However, with this PR, such classes are no longer archived. These tests are now added to `TEST.groups`, along with other old CDS tests that are no longer valid with `-XX:+AOTClassLinking`
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> Exclude test cases that assume (verifiable) old classes are always archived; but they are now not archived when -XX:+AOTClassLinking is enabled
A few additional jtreg tests for CDS (14) required exclusion. These tests are incompatible with the new AOT mode. They have to do with custom class loaders and/or old-version classfiles, and they demand behavior which conflicts with AOT's advertised limitations.
There are now 63 excludes out of a total of about 308 CDS tests, leaving 245 jtreg tests that apply to both CDS and AOT.
The coverage is still reasonable, after removing the additional inappropriate tests.
Approved.
-------------
Marked as reviewed by jrose (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23361#pullrequestreview-2583615034
More information about the hotspot-runtime-dev
mailing list