Relates :
|
|
Relates :
|
|
Relates :
|
JDK-8165808 :
|
|
JDK-8166228 :
|
|
JDK-8166229 :
|
|
JDK-8166583 :
|
|
JDK-8166607 :
|
|
JDK-8166663 :
|
|
JDK-8166862 :
|
The size of arrays and java.lang.Class instances are stored in "length" and "oop_size" fields within the object. The contract for object initialization is that once the object header has been set non-zero (the klass field in particular), the object is parsable by concurrent GCs. Although the source code is writing the fields in the correct order (after JDK-8158946 is fixed), there are no memory fences to ensure that the compiler or CPU doesn't reorder the writes or reads of these fields.
|