8257999: Parallel GC crash in gc/parallel/TestDynShrinkHeap.java: new region is not in covered_region

Reviewed-by: sjohanss, tschatzl
This commit is contained in:
Kim Barrett 2020-12-17 14:18:00 +00:00
parent 952dc70402
commit 61390d8e45

View File

@ -35,6 +35,7 @@
#include "logging/log.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/orderAccess.hpp"
#include "utilities/align.hpp"
PSOldGen::PSOldGen(ReservedSpace rs, size_t initial_size, size_t min_size,
@ -380,7 +381,9 @@ void PSOldGen::post_resize() {
WorkGang* workers = Thread::current()->is_VM_thread() ?
&ParallelScavengeHeap::heap()->workers() : NULL;
// ALWAYS do this last!!
// Ensure the space bounds are updated and made visible to other
// threads after the other data structures have been resized.
OrderAccess::storestore();
object_space()->initialize(new_memregion,
SpaceDecorator::DontClear,
SpaceDecorator::DontMangle,