RFR: 8355236: AOT Assembly crash with unregistered class and -Xlog:cds+resolve=trace
Ioi Lam
iklam at openjdk.org
Thu May 22 05:35:38 UTC 2025
On Mon, 12 May 2025 14:33:06 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Please review this small bug fix. When running `java -XX:AOTMode=create -Xlog:cds+resolve=trace ...`, we are not handling unregistered classes classes in the `get_type()`, which is called only when printing log messages.
>
> src/hotspot/share/oops/constantPool.cpp line 491:
>
>> 489: // unregistered classes by calling SystemDictionaryShared::add_unregistered_class(). Such
>> 490: // classes are not actually loaded so they don't have a class_loader_data.
>> 491: precond(src_ik->is_shared_unregistered_class());
>
> So for this printing, why not just check `src_ik->is_shared_unregistered_class()`? It sounds straight-forward that unregistered classes are printed as `unreg`?
I went with your suggestion and found that `is_shared_unregistered_class()` and friends need to be cleaned up. Please see https://github.com/openjdk/jdk/pull/25365
After that PR, the fix for the current issue will be much more straight-forward -- there's no need to look at `src_ik->class_loader()` anymore. We can just call `ik->defined_by_xxx_loader()`
> test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java line 29:
>
>> 27: * @summary Test how various AOT optimizations handle classes that are excluded from the AOT cache.
>> 28: * @requires vm.cds.write.archived.java.heap
>> 29: * @comment work around JDK-8345635
>
> This `@comment` still valid, or?
Yes, this is still valid. We have a bunch of test cases that fail when running with JVMCI due to this issue.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25171#discussion_r2101062971
PR Review Comment: https://git.openjdk.org/jdk/pull/25171#discussion_r2085780391
More information about the hotspot-dev
mailing list