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

Ioi Lam iklam at openjdk.org
Mon Mar 24 15:40:07 UTC 2025


On Mon, 24 Mar 2025 07:21:20 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Sorry then I don't understand how we get into the state that this PR is trying to fix. ???

When ClassFileParser is parsing a class with the name `"java/foo/ABC"` for  the application class loader, we first come to this line that adds the class into the ClassLoaderData of the app loader:

https://github.com/openjdk/jdk/blob/5709f79cf86d532b38133a7fc11e6388af573723/src/hotspot/share/classfile/classFileParser.cpp#L5017

Later, we find out that the package is prohibited:

https://github.com/openjdk/jdk/blob/5709f79cf86d532b38133a7fc11e6388af573723/src/hotspot/share/classfile/classFileParser.cpp#L5104

The class loading process stops there with an exception, but the failed class remains in the ClassLoaderData.

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

PR Comment: https://git.openjdk.org/jdk/pull/24172#issuecomment-2748559174


More information about the hotspot-runtime-dev mailing list