8153834: G1 Card table verification fails due to concurrent region cleanup
Reviewed-by: ehelin, tschatzl
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Tue Apr 12 09:08:48 2016 +0000
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Tue Apr 12 14:03:31 2016 +0200
@@ -4824,6 +4824,9 @@
workers()->run_task(&cleanup_task);
#ifndef PRODUCT
+ // Need to synchronize with concurrent cleanup since it needs to
+ // finish its card table clearing before we can verify.
+ wait_while_free_regions_coming();
_verifier->verify_card_table_cleanup();
#endif
}