On Wed, 10 Sep 2025 04:12:08 GMT, Ioi Lam <ik...@openjdk.org> wrote: >> src/hotspot/share/memory/iterator.inline.hpp line 58: >> >>> 56: ClaimMetadataVisitingOopIterateClosure::do_cld(cld); >>> 57: } else { >>> 58: assert(AOTLinkedClassBulkLoader::is_pending_aot_linked_class(k), >>> "sanity"); >> >> Why is the null check and assert not valid anymore? > > The AOT cache can have heap objects whose class are loaded by the > platform/app loaders. These objects usually come from aot-linked Lambda > expressions. > > Before this PR, the platform/app classes are loaded after executing quite a > bit of Java code (i.e.,module graph initialization). It's possible for a GC > to happen and discover those heap objects, whose classes are not yet loaded > (i.e., having a null `cld`). > > After this PR, all boot/platform/app classes are loaded before GC can happen, > so we will never run into such null `cld` anymore.
That makes `is_pending_aot_linked_class` dead code. Can it be removed? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26375#discussion_r2337025501