When System.arraycopy() is invoked with a flat array as source and a reference array as destination, the method has to buffer values from the flat array before storing references to these buffered values in the destination array. Because of the missing memory barrier, it is possible for a thread to see the new reference in the destination array before the payload of the value is visible in the buffered instance, leading to the observation of invalid values.
- links to
-
Review(lworld)
openjdk/valhalla/2183