Integrated: 8375541: G1: Race in G1BarrierSet::write_ref_field_post()

Thomas Schatzl tschatzl at openjdk.org
Thu Jan 22 11:07:20 UTC 2026


On Tue, 20 Jan 2026 08:17:05 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   during conversion of card table code to use `Atomic<T>` I think I found the following error: the code in `G1BarrierSet::write_ref_field_post` is wrong in that it allows reload of the `_card_table` value, which is exactly what the existing code imo wrongly fails to ensure. even if it does not, making the load explicit improves reading.
> 
> To not let this change get lost in that conversion, and potentially for backport to 26, I factored it out in this change.
> 
> There is no known issue caused by this code in particular, one other bug I'm working on that just looks like what could be caused by this is not fixed.
> 
> Testing: gha
> 
> Thanks,
>   Thomas

This pull request has now been integrated.

Changeset: 0ad81fbd
Author:    Thomas Schatzl <tschatzl at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/0ad81fbd161edbc8479e5af5c0f8d6098f6c72d1
Stats:     5 lines in 1 file changed: 4 ins; 0 del; 1 mod

8375541: G1: Race in G1BarrierSet::write_ref_field_post()

Reviewed-by: iwalulya, sjohanss, shade

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

PR: https://git.openjdk.org/jdk/pull/29311


More information about the hotspot-gc-dev mailing list