RFR: 8364111: InstanceMirrorKlass iterators should handle CDS and hidden classes consistently [v3]

Aleksey Shipilev shade at openjdk.org
Mon Jul 28 10:51:11 UTC 2025


On Fri, 25 Jul 2025 17:08:01 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Pretty exhausted at this point, I'll mull over it after the weekend. But so far I think we are fine. Testing returns clean as well. If you can schedule some aggressive testing over the weekend, it would be helpful.
>
> Wait, it's actually the other way around: we can see `nullptr` it our explicit check for a non-primitive class, stall, get to the assert, _then_ discover that mirror is installed, and falsely fail the assert. Assert *needs* to be removed, did so in new commit. This also matches current behavior better.

Yes, I believe what we have now is correct. We cannot do anything here if Klass* backlink is not yet installed, and GC code needs to handle it separately. I think all GCs already do by e.g. keeping newly allocated classes alive. I polished the comment a bit.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26477#discussion_r2235837704


More information about the hotspot-dev mailing list