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

Frederic Parain fparain at openjdk.org
Fri Oct 3 19:28:16 UTC 2025


On Fri, 3 Oct 2025 19:23:05 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> 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.

Replying to myself: The answer seems to be in the comment in oop.inline.hpp:98, but it would be nice to know the exact reason.

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

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


More information about the valhalla-dev mailing list