RFR: 8352092: -XX:AOTMode=record crashes with InstanceKlass in allocated state
Ioi Lam
iklam at openjdk.org
Sat Mar 22 04:58:49 UTC 2025
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.
-------------
Commit messages:
- 8352092: -XX:AOTMode=record crashes with InstanceKlass in allocated state
Changes: https://git.openjdk.org/jdk/pull/24172/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24172&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8352092
Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/24172.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24172/head:pull/24172
PR: https://git.openjdk.org/jdk/pull/24172
More information about the hotspot-runtime-dev
mailing list