Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.

Commit 9f39b4b

Browse files
author
Thomas Schatzl
committed
8283555: G1: Concurrent mark accesses uninitialized BOT of closed archive regions
Backport-of: 19f01ab70133d244422684f63f118249178bce4a
1 parent 4b0818c commit 9f39b4b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/hotspot/share/cds/filemap.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,6 +2237,11 @@ void FileMapInfo::fixup_mapped_heap_regions() {
22372237
"Null closed_heap_regions array with non-zero count");
22382238
G1CollectedHeap::heap()->fill_archive_regions(closed_heap_regions,
22392239
num_closed_heap_regions);
2240+
// G1 marking uses the BOT for object chunking during marking in
2241+
// G1CMObjArrayProcessor::process_slice(); for this reason we need to
2242+
// initialize the BOT for closed archive regions too.
2243+
G1CollectedHeap::heap()->populate_archive_regions_bot_part(closed_heap_regions,
2244+
num_closed_heap_regions);
22402245
}
22412246

22422247
// do the same for mapped open archive heap regions
@@ -2249,11 +2254,6 @@ void FileMapInfo::fixup_mapped_heap_regions() {
22492254
// fast G1BlockOffsetTablePart::block_start operations for any given address
22502255
// within the open archive regions when trying to find start of an object
22512256
// (e.g. during card table scanning).
2252-
//
2253-
// This is only needed for open archive regions but not the closed archive
2254-
// regions, because objects in closed archive regions never reference objects
2255-
// outside the closed archive regions and they are immutable. So we never
2256-
// need their BOT during garbage collection.
22572257
G1CollectedHeap::heap()->populate_archive_regions_bot_part(open_heap_regions,
22582258
num_open_heap_regions);
22592259
}

0 commit comments

Comments
 (0)