James Cowgill <james410 at cowgill dot> changed:

           What    |Removed                     |Added
                 CC|                            |james410 at cowgill dot

--- Comment #1 from James Cowgill <james410 at cowgill dot> ---
Created attachment 41966

Here's another testcase which is reduced a bit further using creduce. It
requires -O2 to trigger the bug (but that may be unrelated).

Compile using:
> mips64el-linux-gnuabi64-g++ -g -O2 -fstack-protector-strong -c -o test.o 
> test.c

mips64el-linux-gnuabi64-objdump -dr test.o:
>  98:   8c420000        lw      v0,0(v0)
>  9c:   0002102b        sltu    v0,zero,v0
>  a0:   afa20008        sw      v0,8(sp)
>  a4:   df990000        ld      t9,0(gp)
>                        a4: R_MIPS_CALL16       _Z19aa_policy_cache_newPiiiis
>                        a4: R_MIPS_NONE *ABS*
>                        a4: R_MIPS_NONE *ABS*
>  a8:   dfa80008        ld      a4,8(sp)
>  ac:   00003825        move    a3,zero
>  b0:   00003025        move    a2,zero
>  b4:   00002825        move    a1,zero
>  b8:   0320f809        jalr    t9
>                        b8: R_MIPS_JALR _Z19aa_policy_cache_newPiiiis
>                        b8: R_MIPS_NONE *ABS*
>                        b8: R_MIPS_NONE *ABS*

Here, the value calculated in v0 is stored to the stack in 8(sp) using sw, but
then loaded later using ld.

Reply via email to