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

Bodden, Eric eric.bodden at sit.fraunhofer.de
Mon Sep 16 08:59:27 EDT 2013


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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130916/250a0008/attachment.bin 


More information about the Soot-list mailing list