[Soot-list] Post Dominators

Eric Bodden eric.bodden at mail.mcgill.ca
Tue Jul 14 10:22:40 EDT 2009


Hi Silviu.

Indeed that seems wrong. Do you have a minimal set of test files that
would allow us to debug the problem?

Eric

2009/7/14 Silviu ANDRICA <silviu.andrica at epfl.ch>:
> Hello,
>     I am trying to implement a graph analysis using MHGPostDominatorsFinder,
> but I have the impression that the post-dominator finder has a little bug.
> The body of the method I am having problems with is
>     public void m()
>     {
>         Test r0;
>         int i0;
>         java.io.PrintStream $r1, $r2;
>
>         r0 := @this: Test;
>         i0 = 0;
>         goto label1;
>
>      label0:
>         $r1 = <java.lang.System: java.io.PrintStream out>;
>         virtualinvoke $r1.<java.io.PrintStream: void
> println(java.lang.String)>("Never gonna get out!");
>
>      label1:
>         i0 = i0 + -1;
>         if i0 < 0 goto label0;
>
>         $r2 = <java.lang.System: java.io.PrintStream out>;
>         virtualinvoke $r2.<java.io.PrintStream: void
> println(java.lang.String)>("Impossible!");
>         return;
>     }
> Also, the CFG is attached as a PDF file.
>
> The part of the code that is interesting is:
>         $r2 = <java.lang.System: java.io.PrintStream out>;
>         virtualinvoke $r2.<java.io.PrintStream: void
> println(java.lang.String)>("Impossible!");
>        return;
>
> TheMHGPostDominatorsFinder reports that $r2 = <java.lang.System:
> java.io.PrintStream out>; is post-dominated by itself and return.
> As far as I understand post-dominators, virtualinvoke
> $r2.<java.io.PrintStream: void println(java.lang.String)>("Impossible!");
> should be part of the post-dominators of $r2 = <java.lang.System:
> java.io.PrintStream out> too, or am I wrong?
> Can someone shed light into this problem?
>
> Best regards,
>     Silviu
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



-- 
Eric Bodden
Sable Research Group, McGill University
Montréal, Québec, Canada


More information about the Soot-list mailing list