RFR: 8352092: -XX:AOTMode=record crashes with InstanceKlass in allocated state [v3]

Ioi Lam iklam at openjdk.org
Mon Mar 31 20:48:48 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.

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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24172/files
  - new: https://git.openjdk.org/jdk/pull/24172/files/ae23a56d..45a52fee

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24172&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24172&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 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