RFR: 8312181: CDS dynamic dump crashes when verifying unlinked class from static archive [v4]

Matias Saavedra Silva matsaave at openjdk.org
Tue Aug 1 17:00:50 UTC 2023


On Tue, 1 Aug 2023 00:27:01 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> During CDS dynamic dump, VM crashes due to `assert(!k->is_shared()) failed` while linking an old class (class file version <= 49) loaded from the static archive. The fix mostly adjusts some assert statements based on static vs dynamic dumping. In `MetaspaceShared::try_link_class`, if linking of a shared class during dynamic dump has failed, the `shared_loading_failed` flag will be set to avoid linking the same class again.
>> 
>> Passed tiers 1 - 4 testing.
>
> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
> 
>   revert whitespace changes

Looks good to me! Just one note about a typo

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/OldClassVerifierTrouble.java line 28:

> 26:  * @test
> 27:  * @bug 8312181
> 28:  * @summary Archive an old class, which fails verification and a supertype of another

Small typo with the summary:
> Archive an old class, which fails verification and **is** a supertype of another

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

Marked as reviewed by matsaave (Committer).

PR Review: https://git.openjdk.org/jdk/pull/15077#pullrequestreview-1557442225
PR Review Comment: https://git.openjdk.org/jdk/pull/15077#discussion_r1280912030


More information about the hotspot-runtime-dev mailing list