8066103: C2's range check smearing allows out of bound array accesses

John Rose john.r.rose at oracle.com
Tue Dec 9 18:59:02 UTC 2014


Thumbs up.  — John

> On Dec 9, 2014, at 10:04 AM, Roland Westrelin <roland.westrelin at oracle.com> wrote:
> 
>>>> That's good; let's do it that way!
>>>> 
>>>> Final suggestion (really):  Add some more test cases, containing duplicate array indexes, to exercise the "local" logic. 
>>> 
>>> Thanks John. I’ll add some test cases. Do you want to see another webrev with test cases?
>> 
>> I'd like to look at it, so please update the webrev, but you can proceed with a thumbs up from me as a reviewer no matter what.
> 
> Here is a new webrev for the change I intend to push today:
> 
> http://cr.openjdk.java.net/~roland/8066103/webrev.04/
> 
> It has more test cases and the previous change had some leftover code:
> 
> 939           if (rc0.ctl->in(0)->in(1) == in(1)) {
> 940             // If we match the test exactly, then the top test covers
> 
> 941             // both our lower and upper bounds. Valid only if there's no
> 942             // other range check between us and the top test: for all we
> 943             // know this range check was widened and accesses that
> 944             // depend on it also depend on the previous range checks to
> 945             // be correct.
> 
> 946             prev_dom = rc0.ctl;
> 947           } else {
> 
> Roland.



More information about the hotspot-compiler-dev mailing list