Oddly enough, did not reproduce for me. x86_64, Mac,
Java(TM) SE Runtime Environment (build 1.7.0_21-b12)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
or with
java version "1.8.0-internal-fastdebug"
Java(TM) SE Runtime Environment (build 1.8.0-internal-fastdebug-dr2chase_2013_06_10_15_00-b00)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b37-fastdebug, mixed mode)
was this fixed accidentally?
I will continue to investigate.
|
The problem is caused by: when optimizing Arrays.fill() calls, C2 checks if that call is tightly coupled with an array allocation and omits the implicit zeroing if it is; but it's missing necessary checks of the use of the implicit zero'd values, so it may mistakenly omit the zeroing even when there are uses of the array's contents in between the allocation site and the Arrays.fill() call.
The fix would have to enforce the check so that it respects the uses of implicit zero'd values.
|