RFR: 8321216: SerialGC attempts to access the card table beyond the end of the heap during card table scan
Thomas Schatzl
tschatzl at openjdk.org
Tue Dec 5 15:08:36 UTC 2023
On Tue, 5 Dec 2023 10:00:29 GMT, Albert Mingkun Yang <ayang 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).
Thanks @albertnetymk @walulyai for your reviews.
I'll integrate early because it makes a mess of the CI pipeline, and the change seems obvious enough.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16968#issuecomment-1840978370
More information about the hotspot-gc-dev
mailing list