mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 12:04:39 +02:00
6948538: CMS: BOT walkers can fall into object allocation and initialization cracks
GC workers now recognize an intermediate transient state of blocks which are allocated but have not yet completed initialization. blk_start() calls do not attempt to determine the size of a block in the transient state, rather waiting for the block to become initialized so that it is safe to query its size. Audited and ensured the order of initialization of object fields (klass, free bit and size) to respect block state transition protocol. Also included some new assertion checking code enabled in debug mode. Reviewed-by: chrisphi, johnc, poonam
This commit is contained in:
parent
becf7cffb3
commit
77f845359a
12 changed files with 318 additions and 123 deletions
|
@ -1712,7 +1712,7 @@ class CommandLineFlags {
|
|||
develop(bool, VerifyBlockOffsetArray, false, \
|
||||
"Do (expensive!) block offset array verification") \
|
||||
\
|
||||
product(bool, BlockOffsetArrayUseUnallocatedBlock, trueInDebug, \
|
||||
product(bool, BlockOffsetArrayUseUnallocatedBlock, false, \
|
||||
"Maintain _unallocated_block in BlockOffsetArray" \
|
||||
" (currently applicable only to CMS collector)") \
|
||||
\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue