RFR(M): 8166140: C1: Possible integer overflow in LIRGenerator::generate_address on several platforms

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Sep 15 18:05:42 UTC 2016


Good but is is not enough.

emit_array_address() in c1_LIRGenerator_x86.cpp has the same problem.
I would suggest to look on all places where next methods are called and make sure they are correct:

LIR_Address(LIR_Opr base, intx disp, BasicType type)
LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type)

Thanks,
Vladimir

On 9/15/16 8:25 AM, Doerr, Martin wrote:
> Hi,
>
>
>
> as discussed with Vladimir, C1 contains code to simplify constant index/displacement addressing which uses int. However,
> int may overflow on 64 bit platforms.
>
>
>
> Please review the following webrev:
>
> http://cr.openjdk.java.net/~mdoerr/8166140_C1_int_overflow/webrev.00/
>
>
>
> I’ll also need a sponsor, please.
>
>
>
> Thanks and best regards,
>
> Martin
>
>
>


More information about the hotspot-compiler-dev mailing list