[Soot-list] unreachable code in jimple files?

Martin Schäf martinschaef at gmail.com
Mon Sep 1 14:36:37 EDT 2014


Nope, that doesn't help. If we go back to the Jimple snippet from my
earlier emails, the problem seems to be that you have these two traps:
        catch java.lang.Throwable from label0 to label16 with label21;
        catch java.lang.Throwable from label0 to label16 with label23;
where the latter is technically unreachable but seems to be considered in
the dataflow analysis. In this code (pasted below), if you jump to label21,
the check r25==null is trivial. However, if you would jump directly to
label23, you could reach r5==null where it is actually true.
So the problem seems to be that there are infeasible edges in the
exceptional unit graph (which could be weeded out) ...

     label21:
        $r24 := @caughtexception;

     label22:
        r25 = $r24;
        r5 = r25;
        throw r25;

     label23:
        $r26 := @caughtexception;
        r11 = $r26;

     label24:
        if r4 == null goto label29;

        if r5 == null goto label28;


On Mon, Sep 1, 2014 at 9:35 AM, Bodden, Eric <eric.bodden at sit.fraunhofer.de>
wrote:

> > Hmmm, so are you actually running a transformation that evaluates the
> nullness information to turn checks like if(r4==null) into if(false)?
>
> I just checked... specifically that would be
> soot.jimple.toolkits.annotation.nullcheck.NullCheckEliminator. Are you
> running this one? And it shows no effect on this code?
>
> Cheers,
> Eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140901/d33e69e5/attachment.html 


More information about the Soot-list mailing list