RFR: 8345293: Fix generational Shenandoah with compact headers

Thomas Stuefe stuefe at openjdk.org
Mon Dec 2 13:52:37 UTC 2024


On Mon, 2 Dec 2024 11:09:37 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> See bug for crash details.
> 
> The problem is in the code that gets the object age out of the mark-word. That code has a special cases for when an object is monitor locked, in which case it fetches the displaced header out of the monitor and extracts the age from there. However, with compact headers, we're running with ObjectMonitorTable, and decoding the monitor-locked mark-word crashes.
> 
> The fix is simple: when we are running with ObjectMonitorTable, the mark-word never gets overloaded by locking, so we can return the age straight out of the mark-word.
> 
> Testing:
>  - [x] hotspot_gc_shenandoah +UCOH

Good.

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

Marked as reviewed by stuefe (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22477#pullrequestreview-2472754459


More information about the hotspot-gc-dev mailing list