8141422: G1 eager reclaim card dirtying may dirty outside of allocated objects
authormgerdin
Wed, 04 Nov 2015 16:42:11 +0100
changeset 33757 a3ff821552b7
parent 33756 fc1eddc092e7
child 33760 e2acc6d959f5
child 33761 329db4b51480
child 33764 a75559af2868
8141422: G1 eager reclaim card dirtying may dirty outside of allocated objects Reviewed-by: sjohanss, tschatzl, ehelin
hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Tue Nov 03 19:53:10 2015 -0500
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp	Wed Nov 04 16:42:11 2015 +0100
@@ -3613,7 +3613,7 @@
           // The remembered set might contain references to already freed
           // regions. Filter out such entries to avoid failing card table
           // verification.
-          if (!g1h->heap_region_containing(bs->addr_for(card_ptr))->is_free()) {
+          if (g1h->is_in_closed_subset(bs->addr_for(card_ptr))) {
             if (*card_ptr != CardTableModRefBS::dirty_card_val()) {
               *card_ptr = CardTableModRefBS::dirty_card_val();
               _dcq.enqueue(card_ptr);