Integrated: 8291653: G1 refinement incorrectly expects always-valid HeapRegion out of the Hot Card Cache

Thomas Schatzl tschatzl at openjdk.org
Fri Aug 5 16:23:57 UTC 2022


On Wed, 3 Aug 2022 11:36:51 GMT, Thomas Schatzl <tschatzl 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

This pull request has now been integrated.

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

8291653: G1 refinement incorrectly expects always-valid HeapRegion out of the Hot Card Cache

Reviewed-by: kbarrett, ayang

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

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



More information about the hotspot-gc-dev mailing list