Re: Infinite loop with OOM while testing Sparse on Wine code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 29, 2017 at 10:39 AM, Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
> No it's fine. It's the way of displaying that the element have been removed.
>
>> it should be:
>>
>> phi.32 %r1(ansi) <- 1, %phi4(ansi)
>
> No, not really.
> L1 has now only a single parent, the phi-node is now a trivial one,
> not really a join anymore.
> An explicit way of displaying it should simply be:
>         phi.32      %r1(ansi) <- %phi4(ansi)

OK, Great. It seems my decode attempt did not go far at all :(
Nice try.
.
>
> Everything is correct until:
>         test_menu_iteminfo:
>         .L0:
>                 <entry-point>
>                 br          .L4
>         .L1:
>                 phi.32      %r1(ansi) <- VOID, %phi4(ansi)
>                 cbr         %r1(ansi), .L4, .L5
>         .L4:
>                 cast.64     %r3 <- (64) stringA
>                 br          .L5
>         .L5:
>                 cbr         %r1(ansi), .L6, .L3
>         .L6:
>                 ptrcast.64  %r6 <- (64) %r3
>                 ptrcast.64  %r8 <- (64) VOID                    <== wrong but unrelated
>                 call.64     %r9 <- strcpy, %r6, %r8
>                 br          .L2
>         .L2:
>                 seteq.32    %r11 <- %r1(ansi), $0
>                 phisrc.32   %phi4(ansi) <- %r11
>                 cbr         %r1(ansi), .L1, .L3
>         .L3:
>                 ret
>
> Then simplify_branch_branch() is called on L2 -> L1
> and wrongly succeed giving:

My original thinking was .L1:
Ophi.32      %r1(ansi) <- VOID, %phi4(ansi)

feeding the .L2:
cbr         %r1(ansi), .L1, .L3

Got the wrong result so I suspect some thing was wrong with
%r1(ansi).  I admit I don't know what exactly simplify_branch_branch()
was doing there.

.L5: also have
cbr         %r1(ansi), .L6, .L3
I don't know why this one is fine.


>                 seteq.32    %r11 <- %r1(ansi), $0
>                 phisrc.32   %phi4(ansi) <- %r11
>                 cbr         %r1(ansi), .L4, .L3                 <== bad change
>         .L3:
>                 ret
>
> This will then trigger the wrong simplifications:
>         %phi4 <- %r11
> and
>         %r1   <- %r11
> giving finally:
>                 setne.32    %r11 <- %r11, $0
>
> As far as I can see, simplify_branch_branch() needs something
> like the bb_defines_phi() I had to add to try_to_simplify_bb()
> (basically it's bb_depends_on() which is not 'strong' enough).

Thanks you so much for the excellent diagnose.

> At this point I don't think anymore that the revert is the most
> appropriate thing to do.

That is what I am looking for. I want to find out if there is any
thing else like this on -rc4+.

Thanks again.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux