RFR: 8321216: SerialGC attempts to access the card table beyond the end of the heap during card table scan

Albert Mingkun Yang ayang at openjdk.org
Tue Dec 5 11:26:19 UTC 2023


On Tue, 5 Dec 2023 09:39:07 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   please review this fix to ` CardTableRS::find_first_clean_card` where when iterating through the object at the very end of the heap Serial GC accesses the card table beyond the allocated memory, which fails with an assert.
> 
> The fix is to allow retrieving addresses for cards beyond the card table using a special `addr_for_raw` method. 
> 
> In discussions with @albertnetymk , the initial version to add a check whether the current scan cursor is already at or beyond the end of the area to find clean cards for using an extra, somewhat superfluous parameter has been rejected as a bit confusing (the first commit).
> 
> Testing: failing test case, gha
> 
> Thanks,
>   Thomas

Marked as reviewed by ayang (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/16968#pullrequestreview-1764608705


More information about the hotspot-gc-dev mailing list