Integrated: 8352092: -XX:AOTMode=record crashes with InstanceKlass in allocated state

Ioi Lam iklam at openjdk.org
Mon Mar 31 23:38:23 UTC 2025


On Sat, 22 Mar 2025 04:39:40 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.

This pull request has now been integrated.

Changeset: a83760a6
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/a83760a6f204837b737b82801ee9eca2988317cf
Stats:     48 lines in 1 file changed: 17 ins; 17 del; 14 mod

8352092: -XX:AOTMode=record crashes with InstanceKlass in allocated state

Reviewed-by: dholmes, coleenp

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

PR: https://git.openjdk.org/jdk/pull/24172


More information about the hotspot-runtime-dev mailing list