RFR: 8375541: G1: Race in G1BarrierSet::write_ref_field_post() [v2]
Ivan Walulya
iwalulya at openjdk.org
Wed Jan 21 13:54:15 UTC 2026
On Tue, 20 Jan 2026 18:17:54 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
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
>
> * fix copmilation
Marked as reviewed by iwalulya (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/29311#pullrequestreview-3687356570
More information about the hotspot-gc-dev
mailing list