changeset 52594:4d8a023c2a03

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
author jiangli
date Fri, 16 Nov 2018 13:23:50 -0500
parents 8c887dcd5d90
children 16609197022c
files src/hotspot/share/gc/g1/heapRegionManager.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;