RFR (S): C1: compiler.escapeAnalysis.TestArrayCopy fails to throw ArrayStoreException
zoltan.majo at oracle.com
Tue Nov 1 08:14:17 UTC 2016
Thank you, Vladimir, for the review!
On 10/31/2016 08:49 PM, Vladimir Kozlov wrote:
> On 10/31/16 7:09 AM, Zoltán Majó wrote:
>> please review the fix for 8167578.
>> Problem: The System.arraycopy() implementation in C1 does not throw an
>> ArrayStoreException withthe open/closed ARM port
>> - if the element type of the source array is no assignable to the
>> element type of the destination array AND
>> - the length of the array is 0.
>> If the above condition holds, the arraycopy is just not performed
>> (because the length is 0), even though the API documentation requires an
>> exception to be thrown. That is different from the way arraycopy works
>> on other platforms / the interpreter / C2 (which all comply with the
>> Solution: Removed "shortcutting" code in C1. I've not found the
>> assert(s) in the stubs mentioned in the comment. It seems the stubs
>> accept the length being 0; that is what the comments in the stubs also
>> state. The problem is triggered (and can be reproduced) using the
>> TestArrayCopy.java test to be added with Volker Simonis's already
>> reviewed change for 8159611 . I plan to push the fix for 8159611
>> after this fix makes into the repo.
>> Testing: Executed all hotspot tests with the open aarch64 build with (1)
>> the default flag settings and also with (2) -Xcomp
>> -XX:TieredStopAtLevel=1. No new failures have shown up. Many thanks to
>> Roland Westrelin for his help with testing the fix!
>> Thank you!
>> Best regards,
More information about the hotspot-compiler-dev