RFR: 8352092: -XX:AOTMode=record crashes with InstanceKlass in allocated state [v3]
David Holmes
dholmes at openjdk.org
Mon Mar 31 21:35:22 UTC 2025
On Mon, 31 Mar 2025 20:48:48 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Please review this small fix for a crash that can be caused only with JNI `DefineClass()` calls, which can leave a class in the `allocated` state inside a `ClassLoaderData` when the class is in a prohibited package such as `java/foo`.
>>
>> The bug was found when running the JCK with an AOT cache. I tried to write a jtreg regression test but it's not possible to use pure Java code to reproduce this condition -- attempts by Java code to define classes in a prohibited package will be blocked from entering the ClassFileParser.
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> Removed empty constructor, as the default constructor is already public
Looks good. Thanks for the offline explanations about why this is a preferred way to walk the classes.
-------------
Marked as reviewed by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24172#pullrequestreview-2730552649
More information about the hotspot-runtime-dev
mailing list