RFR: 8338693: assert(Atomic::add(&ik->_shared_class_load_count, 1) == 1) failed: shared class loaded more than once

Kim Barrett kbarrett at openjdk.org
Thu Sep 12 18:04:09 UTC 2024


On Wed, 11 Sep 2024 21:24:53 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

> The test vmTestbase/nsk/sysdict/vm/stress/chain/chain007/chain007.java  occasionally fails due to the number of shared classes being incremented even though the shared class is not loaded. This patch moves the assert to only increment once loading is possible.

Not a review, just a comment in passing.
`_shared_class_load_count` is declared `NOT_PRODUCT`, but should be
`DEBUG_ONLY` if it's only going to be used in an assert.
I kind of cringe at an assert with side-effects, but since it's debug-only data...

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

PR Review: https://git.openjdk.org/jdk/pull/20955#pullrequestreview-2301045887


More information about the hotspot-runtime-dev mailing list