[Soot-list] Immediate dominator of non-head nodes in a multi-headed CFG

Haipeng Cai hcai at nd.edu
Mon Sep 16 10:36:59 EDT 2013


Thanks Eric for your response.
Right I think I was using some older codes even though it seemed that I
used the 2.5.0 version. I worked around it by adding a virtual start and
exit node to ensure a single-head single-tail CFG and thus got through it.
With a new release I probably would not need that workarounds, but it can
still make my other steps easier.

Thanks,
-haipeng cai


On Mon, Sep 16, 2013 at 8:59 AM, Bodden, Eric <eric.bodden at sit.fraunhofer.de
> wrote:

> I can see that Steven already fixed this. Yes this really seems to be some
> legacy from ancient times. Thanks for spotting this.
>
> Cheers,
> Eric
>
> On 07.08.2013, at 00:39, Haipeng Cai <hcai at nd.edu> wrote:
>
> > Hi,
> >
> > There is an assertion "assert immediateDominator!=null" in
> soot.toolkits.graph.MHGDominatorFinder::getImmediateDominator, which I
> don't understand and even doubt it could be a buggy assertion.
> >
> > For an example as attached (in Jimple IR), the CFG has two exits
> (returns) hence its inverse graph two entries (heads) -
> MHGPostDominatorFinder
> > simply is built upon MHGDominatorFinder by taking the inverse CFG.
> However, unit node s1 (blackened in the example below) won't have
> post-dominators by definition, or it does not have dominators from within
> MHGDominatorFinder. Also, it is not a head node either. Then, the immediate
> dominator of it will be null. As a result, the assertion will fail with
> this CFG when invoking getImmediateDominator.
> >
> > In case I misunderstood something, can anyone help explain why this
> assertion should actually be there, please? Or, it is really a bug?
> > Any advice is sincerely appreciated!
> >
> > Thanks!
> >
> > -------------------------------------------------------------------
> example code ---------------------------------------------------------
> >  int M3(int, int)
> >     {
> >         B r0;
> >         int i0, i1, i2;
> >         boolean z0;
> >         double $d0;
> >
> >         r0 := @this: B;
> >         i0 := @parameter0: int;
> >         i1 := @parameter1: int;
> >         r0.<B: double c> = 1.2;
> >         <B: float l> = -250.0F;
> > s1:    if i0 <= i1 goto label0;
> >
> >         return 0;
> >
> >      label0:
> >         z0 = 0;
> >         if i0 >= i1 goto label1;
> >
> >         i2 = i1 - i0;
> >         goto label2;
> >
> >      label1:
> >         $d0 = r0.<B: double c>;
> >         i2 = (int) $d0;
> >
> >      label2:
> >         return i2;
> >     }
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at sable.mcgill.ca
> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
> --
> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> Head of Secure Software Engineering  at Fraunhofer SIT, TU Darmstadt and
> EC SPRIDE
> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130916/bf662791/attachment.html 


More information about the Soot-list mailing list