--- a/src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp Mon Oct 21 15:11:42 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahMarkCompact.cpp Mon Oct 21 15:11:43 2019 +0200
@@ -128,6 +128,9 @@
// e. Set back forwarded objects bit back, in case some steps above dropped it.
heap->set_has_forwarded_objects(has_forwarded_objects);
+ // f. Sync pinned region status from the CP marks
+ heap->sync_pinned_region_status();
+
// The rest of prologue:
BiasedLocking::preserve_marks();
_preserved_marks->init(heap->workers()->active_workers());
@@ -505,6 +508,10 @@
ShenandoahHeap* heap = ShenandoahHeap::heap();
+ // About to figure out which regions can be compacted, make sure pinning status
+ // had been updated in GC prologue.
+ heap->assert_pinned_region_status();
+
{
// Trash the immediately collectible regions before computing addresses
ShenandoahTrashImmediateGarbageClosure tigcl;