Skip to content

Commit 38b4d46

Browse files
Cesar Soares LucasWilliam Kemper
authored andcommitted
8351081: Off-by-one error in ShenandoahCardCluster
Reviewed-by: wkemper
1 parent 29de20d commit 38b4d46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ class ShenandoahCardCluster: public CHeapObj<mtGC> {
402402

403403
ShenandoahCardCluster(ShenandoahDirectCardMarkRememberedSet* rs) {
404404
_rs = rs;
405-
_object_starts = NEW_C_HEAP_ARRAY(crossing_info, rs->total_cards(), mtGC);
405+
_object_starts = NEW_C_HEAP_ARRAY(crossing_info, rs->total_cards() + 1, mtGC); // the +1 is to account for card table guarding entry
406406
for (size_t i = 0; i < rs->total_cards(); i++) {
407407
_object_starts[i].short_word = 0;
408408
}

0 commit comments

Comments
 (0)