hotspot/src/share/vm/gc/g1/g1RemSet.cpp
changeset 42588 d628ae4e12a2
parent 41313 6593aed45a67
child 42589 037b433e8069
--- a/hotspot/src/share/vm/gc/g1/g1RemSet.cpp	Tue Nov 22 13:59:45 2016 -0800
+++ b/hotspot/src/share/vm/gc/g1/g1RemSet.cpp	Tue Nov 22 20:24:47 2016 -0500
@@ -675,9 +675,10 @@
                                         card_ptr);
 
   // If unable to process the card then we encountered an unparsable
-  // part of the heap (e.g. a partially allocated object).  Redirty
-  // and re-enqueue: if we put off the card until a GC pause, then the
-  // allocation will have completed.
+  // part of the heap (e.g. a partially allocated object) while
+  // processing a stale card.  Despite the card being stale, redirty
+  // and re-enqueue, because we've already cleaned the card.  Without
+  // this we could incorrectly discard a non-stale card.
   if (!card_processed) {
     assert(!_g1->is_gc_active(), "Unparsable heap during GC");
     // The card might have gotten re-dirtied and re-enqueued while we