[lworld] RFR: 8366705: [lworld] Re-work of arrays meta-data [v4]
Frederic Parain
fparain at openjdk.org
Mon Sep 8 13:45:32 UTC 2025
On Fri, 5 Sep 2025 14:58:41 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> src/hotspot/share/cds/heapShared.cpp line 1299:
>>
>>> 1297: Klass* resolved_k = SystemDictionary::resolve_or_null(k->name(), CHECK);
>>> 1298: if (resolved_k->is_array_klass()) {
>>> 1299: assert(resolved_k == k || ((ObjArrayKlass*)resolved_k)->next_refined_array_klass() == k, "classes used by archived heap must not be replaced by JVMTI ClassFileLoadHook");
>>
>> Should this be is_objArray_klass() ? and ObjArrayKlass::cast(resolved_k) instead?
>
> Yes that would be more correct. However, the check for `next_refined_array_klass()` may not be valid once CDS heap dumping is enabled as there could be more entries into the linked list. The fix here would be to check for
> `assert(resolved_k == k || resolved_k == k->super(), "...")`
Fixed.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1452#discussion_r2330293503
More information about the valhalla-dev
mailing list