File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1668,12 +1668,13 @@ bool G1RemSet::clean_card_before_refine(CardValue** const card_ptr_addr) {
1668
1668
} else if (card_ptr != orig_card_ptr) {
1669
1669
// Original card was inserted and an old card was evicted.
1670
1670
start = _ct->addr_for (card_ptr);
1671
- r = _g1h->heap_region_containing (start);
1671
+ r = _g1h->heap_region_containing_or_null (start);
1672
1672
1673
1673
// Check whether the region formerly in the cache should be
1674
1674
// ignored, as discussed earlier for the original card. The
1675
- // region could have been freed while in the cache.
1676
- if (!r->is_old_or_humongous_or_archive ()) {
1675
+ // region could have been freed (or even uncommitted) while
1676
+ // in the cache.
1677
+ if (r == nullptr || !r->is_old_or_humongous_or_archive ()) {
1677
1678
return false ;
1678
1679
}
1679
1680
*card_ptr_addr = card_ptr;
You can’t perform that action at this time.
0 commit comments