RFR(S): 8155241: Crash with assert in Xcomp mode and with disabled ReduceBulkZeroing

Tobias Hartmann tobias.hartmann at oracle.com
Tue May 10 17:49:01 UTC 2016


Hi Vladimir,

On 10.05.2016 19:33, Vladimir Kozlov wrote:
> Is it only assert problem? Based on your comment "takes care of zeroing the array" it may be not enough. Can you explain more?

Yes, I think the assert is wrong because it assumes that a clonebasic arraycopy always takes care of zeroing (simply by overwriting) a newly allocated destination array. However, with -XX:-ReduceBulkZeroing this is not the case and the array is needlessly zeroed directly after the allocation and before the clonebasic which overwrites the array anyway.

Maybe Roland (CC'ed) can verify.

Thanks,
Tobias

> 
> Thanks,
> Vladimir
> 
> On 5/10/16 3:26 AM, Tobias Hartmann wrote:
>> Hi,
>>
>> please review the following patch:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8155241
>> http://cr.openjdk.java.net/~thartmann/8155241/webrev.00/
>>
>> JDK-8076188 introduced code that eliminates an arraycopy if the destination is non escaping. The newly added LoadNode::find_previous_arraycopy() assumes that a clonebasic arraycopy that overwrites a newly allocated array always sets the corresponding InitializeNode to "complete", i.e., takes care of zeroing the array. However, this is only the case if ReduceBulkZeroing is enabled.
>>
>> I fixed the assert and added a regression test.
>>
>> Tested with JPRT and RBT (running).
>>
>> Thanks,
>> Tobias
>>


More information about the hotspot-compiler-dev mailing list