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 11:26:19 UTC 2023
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
-------------
Commit messages:
- visibility of addr_for_raw
- whitespace fix
- discussion-with-ayang-use-addr_for_raw-instead-of-extra parameter
- initial version
Changes: https://git.openjdk.org/jdk/pull/16968/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16968&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8321216
Stats: 25 lines in 2 files changed: 19 ins; 3 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/16968.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16968/head:pull/16968
PR: https://git.openjdk.org/jdk/pull/16968
More information about the hotspot-gc-dev
mailing list