[master] Integrated: 8353849: [Lilliput] Avoid race in compact identity hashcode

Roman Kennke rkennke at openjdk.org
Tue Apr 8 18:46:48 UTC 2025


On Mon, 7 Apr 2025 12:48:02 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> Multiple GC threads can concurrently update an object's mark-word (Parallel, G1 and Shenandoah). We need to be careful when doing object-size calculations and pass-through the pre-loaded, safe mark-word, instead of re-loading the mark-word from the object. In the latter case, we might read a forwarding pointer and interpret the bits as hash-bits which would lead to wrong size-calculation and crash.
> 
> Testing:
> - hotspot_gc (+UCOH)

This pull request has now been integrated.

Changeset: e20e6c84
Author:    Roman Kennke <rkennke at openjdk.org>
URL:       https://git.openjdk.org/lilliput/commit/e20e6c8450d355478a564f9b6147ab5bc0ffdf7d
Stats:     27 lines in 14 files changed: 4 ins; 0 del; 23 mod

8353849: [Lilliput] Avoid race in compact identity hashcode

Reviewed-by: zgu, wkemper

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

PR: https://git.openjdk.org/lilliput/pull/196


More information about the lilliput-dev mailing list