RFR: 8262295: C2: Out-of-Bounds Array Load from Clone Source [v2]

Richard Reingruber rrich at openjdk.java.net
Fri Mar 19 10:59:40 UTC 2021


On Fri, 19 Mar 2021 09:25:55 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Richard Reingruber has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Changes based on feedback from Vladimir K.
>
> src/hotspot/share/opto/memnode.cpp line 552:
> 
>> 550:       const TypeInt* sizetype  = ary_t->size();
>> 551: 
>> 552:       if (ld_offs_t->_lo >= header && ld_offs_t->_hi < sizetype->_lo * elemsize + header) {
> 
> Isn't there a risk of overflow with sizetype->_lo * elemsize + header?

Yes, I agree. What about using jlong for elemsize and header?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2708


More information about the hotspot-compiler-dev mailing list