8213898: CDS dumping of springboot asserts in G1ArchiveAllocator::alloc_new_region
authorjiangli
Fri, 16 Nov 2018 13:23:50 -0500
changeset 52594 4d8a023c2a03
parent 52593 8c887dcd5d90
child 52595 16609197022c
8213898: CDS dumping of springboot asserts in G1ArchiveAllocator::alloc_new_region Summary: HeapRegionManager::find_highest_free needs to check if the region obtained from the HeapRegionManager::_regions is available. Reviewed-by: tschatzl, sjohanss
src/hotspot/share/gc/g1/heapRegionManager.cpp
--- a/src/hotspot/share/gc/g1/heapRegionManager.cpp	Fri Nov 16 09:49:05 2018 -0800
+++ b/src/hotspot/share/gc/g1/heapRegionManager.cpp	Fri Nov 16 13:23:50 2018 -0500
@@ -321,7 +321,7 @@
   uint curr = max_length() - 1;
   while (true) {
     HeapRegion *hr = _regions.get_by_index(curr);
-    if (hr == NULL) {
+    if (hr == NULL || !is_available(curr)) {
       uint res = expand_at(curr, 1, NULL);
       if (res == 1) {
         *expanded = true;