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

Vladimir Kozlov vladimir.kozlov at oracle.com
Tue May 10 20:49:03 UTC 2016


My concern is that the code which calls find_previous_arraycopy() may 
have dependency on object initialization by arracopy. It, for example, 
can assume that whole allocated object is initialized by so we can load 
value from arraycopy's src array. Why the assert checks that allocatoin 
is initialized by arraycopy otherwise?

On other hand set_clonebasic() is only used in Object.clone() intrinsic 
where whole object is copied by arraycopy. So initialization complete 
check is useless unless set_clonebasic() could be used in other cases.

Thanks,
Vladimir

On 5/10/16 11:49 AM, Roland Westrelin wrote:
>
>> 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.
>
> I don't remember for sure but AFAICT, the assert is only a sanity check
> so I would say the change is good.
>
> Roland.
>


More information about the hotspot-compiler-dev mailing list