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

Tobias Hartmann tobias.hartmann at oracle.com
Wed May 22 15:09:27 UTC 2019

Thanks Vladimir.

Best regards,

On 22.05.19 17:08, Vladimir Ivanov 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