RFR: 8353298: AOT cache creation asserts with _array_klasses in an unregistered InstanceKlass

Ioi Lam iklam at openjdk.org
Thu Apr 17 05:41:09 UTC 2025


The assert in `Klass::remove_java_mirror()` is too narrow. When creating the AOT cache, it's possible to see two types of Klasses that do not have a Java mirror:

- Unregistered classes (a cached class to be loaded by a custom class loader in the production run)
- An array type of an unregistered class

I have relaxed the assert to accept both conditions

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

Commit messages:
 - 8353298: AOT cache creation asserts with _array_klasses in an unregistered InstanceKlass

Changes: https://git.openjdk.org/jdk/pull/24711/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24711&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8353298
  Stats: 113 lines in 2 files changed: 111 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/24711.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24711/head:pull/24711

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


More information about the hotspot-dev mailing list