RFR: 8337958: Out-of-bounds array access in secondary_super_cache
Vladimir Ivanov
vlivanov at openjdk.org
Wed Aug 7 01:58:42 UTC 2024
On Tue, 6 Aug 2024 23:35:55 GMT, Andrew Haley <aph at openjdk.org> wrote:
> The fix for [JDK-8180450](https://bugs.openjdk.org/browse/JDK-8180450), secondary_super_cache does not scale well, has a rare (and benign) out-of-bounds array access. While this bug is very unlikely ever to cause a failure, it should be fixed.
The fix looks good. I submitted it for testing.
src/hotspot/share/oops/klass.cpp line 347:
> 345: }
> 346:
> 347: // Invariant: _secondary_supers.length >= population_count(_secondary_supers_bitmap)
It makes sense to assert the invariant in `Klass::set_secondary_supers()` (and, probably, `Klass::restore_unshareable_info()` for a shared klass loaded from CDS archive).
-------------
Marked as reviewed by vlivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20483#pullrequestreview-2222493458
PR Review Comment: https://git.openjdk.org/jdk/pull/20483#discussion_r1706284693
More information about the hotspot-dev
mailing list