On Wed, 17 Jul 2024 18:54:32 GMT, Vladimir Ivanov <vliva...@openjdk.org> wrote:
>> Now it starts to sound concerning... `Klass::set_secondary_supers()` >> initializes both `_secondary_supers` and `_bitmap` which implies that >> `Klass::is_subtype_of()` may be called on not yet initialized Klass. It >> that's the case, it does look like a bug on its own. How is it expected to >> work when `_secondary_supers` hasn't been set yet? > > On a second thought the following setter may be the culprit: > > void Klass::set_secondary_supers(Array<Klass*>* secondaries) { > assert(!UseSecondarySupersTable || secondaries == nullptr, ""); > set_secondary_supers(secondaries, SECONDARY_SUPERS_BITMAP_EMPTY); > } > > It should be adjusted to set `SECONDARY_SUPERS_BITMAP_FULL` instead. I've spent a while trying to reproduce the problem but I can't. I was seeing a problem where `Klass::is_subtype_of(vmClasses::Cloneable_klass())` was being called before the bitmap had been set. I'm not sure what to think, really. Maybe I should just back out this change to see what happens. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19989#discussion_r1683174591