[lworld] RFR: 8368875: [lworld] UseParallelGC fails null narrow klass assertion failure

Coleen Phillimore coleenp at openjdk.org
Fri Oct 3 19:28:15 UTC 2025


On Fri, 3 Oct 2025 19:19:59 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> Maybe we can consider this as a further enhancement.  If we add valhalla bits (although I think we're out of bits), this would make sense to collect them all.  I think all of this is probably optimized to one load and compare since it's inline.
>
> is_larval_state() is a status that is specific to a particular instance, and cannot be retrieved from another source, and this is why it must be preserved. is_inline_type(), is_flat_array() and is_null_free_array() are all properties than can be retrieved from the K-klass. So I'm not sure why they have been added here.

The bug was that in parallelGC it is unsafe to retrieve the K-Klass to find these properties to re-initialize the moved object.  The moved object has written over the markWord because it's not preserved.  Adding the code that we must preserve the mark word because these bits matter fixes the bug because then the moved object will have these bits.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1655#discussion_r2403122604


More information about the valhalla-dev mailing list