[13] 8224539: C2 compilation fails during ArrayCopyNode optimizations with assert(i < _max) failed: oob: i=1, _max=1

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed May 22 15:53:13 UTC 2019


+1

Thanks
Vladimir

> On May 22, 2019, at 8:08 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
> 
> 
>> http://cr.openjdk.java.net/~thartmann/8224539/webrev.00/
> 
> Looks good.
> 
> Best regards,
> Vladimir Ivanov
> 
>> The fix for JDK-8212243 [1] changed the implementation of the ArrayCopyNode optimizations to access
>> the src/dst adr nodes to get the base:
>> http://hg.openjdk.java.net/jdk/jdk/rev/e3d79743f57d#l10.10
>> http://hg.openjdk.java.net/jdk/jdk/rev/e3d79743f57d#l10.23
>> Now it can happen that either one is top if the array size is known and the offset is out of bounds.
>> For example, with incremental inlining we might not know the constant array size once the
>> ArrayCopyNode is created but only once we execute ideal transformations (see regression test). The
>> ArrayCopyNode will eventually be removed because the range checks fail but control is still valid at
>> the time when we hit the assert.
>> Tested with regression test and relevant tiers (running).
>> Thanks,
>> Tobias
>> [1] https://bugs.openjdk.java.net/browse/JDK-8212243



More information about the hotspot-compiler-dev mailing list