7040068: CMS: Possibly unsafe initialization of BlockOffsetArrayUseUnallocatedBlock
Summary: BlockOffsetArrayUseUnallocatedBlock was intended to be turned off as part of BUG 6948538 but a code line in collectorPolicy.cpp actually kept it turned on.
Reviewed-by: jwilhelm, ysr
--- a/hotspot/src/share/vm/memory/collectorPolicy.cpp Mon May 02 07:08:53 2011 -0700
+++ b/hotspot/src/share/vm/memory/collectorPolicy.cpp Fri Apr 29 09:11:03 2011 +0200
@@ -265,8 +265,6 @@
MaxHeapSize = align_size_up(MaxHeapSize, max_alignment());
always_do_update_barrier = UseConcMarkSweepGC;
- BlockOffsetArrayUseUnallocatedBlock =
- BlockOffsetArrayUseUnallocatedBlock || ParallelGCThreads > 0;
// Check validity of heap flags
assert(OldSize % min_alignment() == 0, "old space alignment");
--- a/hotspot/src/share/vm/runtime/globals.hpp Mon May 02 07:08:53 2011 -0700
+++ b/hotspot/src/share/vm/runtime/globals.hpp Fri Apr 29 09:11:03 2011 +0200
@@ -1824,7 +1824,7 @@
develop(bool, VerifyBlockOffsetArray, false, \
"Do (expensive!) block offset array verification") \
\
- product(bool, BlockOffsetArrayUseUnallocatedBlock, false, \
+ diagnostic(bool, BlockOffsetArrayUseUnallocatedBlock, false, \
"Maintain _unallocated_block in BlockOffsetArray" \
" (currently applicable only to CMS collector)") \
\