RFR: 8291653: G1 refinement incorrectly expects always-valid HeapRegion out of the Hot Card Cache
Thomas Schatzl
tschatzl at openjdk.org
Fri Aug 5 16:21:30 UTC 2022
On Fri, 5 Aug 2022 11:45:02 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Hi all,
>>
>> can I have reviews for this wrong use of `G1CollectedHeap::heap_region_containing` in `G1RemSet::clean_card_before_refine()`?
>>
>> If a card is evicted from the hot card cache it might also be located in an outdated (reclaimed) region (by Remark). So the call needs to explicitly consider that case and use `heap_region_containing_or_null` and appropriately check for that later.
>>
>> This is only an issue in debug mode, because while still this is kind of an illegal request, the return value will always be a valid `HeapRegion` instance as we never deallocate them.
>>
>> Testing: reproduced crashes with the given test case (1:5), no more crashes afterwards.
>>
>> Thanks,
>> Thomas
>
> Marked as reviewed by ayang (Reviewer).
Thanks @albertnetymk @kimbarrett for your reviews
-------------
PR: https://git.openjdk.org/jdk/pull/9724
More information about the hotspot-gc-dev
mailing list