[Soot-list] Missing Nodes in CFG

Dennis Titze dennis.titze at googlemail.com
Thu Mar 6 03:02:32 EST 2014


Hi,

I stumbled over the following problem, but I am not sure if I am doing
something wrong:

After running an Android-Infoflow Analysis, I want to look at the
generated CFG (using VTA). But it seems as if some nodes are missing.
E.g. for the following jimple:

private java.lang.String get_phone()
{
    com.example.android.skeletonapp.SkeletonActivity $r0;
    java.lang.Object $r1;
    java.lang.String $r2;
    android.telephony.TelephonyManager $r3;

    $r0 := @this: com.example.android.skeletonapp.SkeletonActivity;
    $r1 = virtualinvoke
$r0.<com.example.android.skeletonapp.SkeletonActivity:
java.lang.Object getSystemService(java.lang.String)>("phone");
    $r3 = (android.telephony.TelephonyManager) $r1;
    $r2 = virtualinvoke $r3.<android.telephony.TelephonyManager:
java.lang.String getLine1Number()>();
    return $r2;
}

the call to getLine1Number does not appear in the CFG.

When looking at the Sparktransformer, the CFG looks quite fine after
    final PAG pag = b.setup( opts );
    b.build();

But once the CFG is built again using the pag
    CallGraphBuilder cgb = new CallGraphBuilder( pag );
    cgb.build();

the mentioned node is not in the CFG anymore.

Problem seems to be, that p2set for this line in public void build()
is empty. If I add something like
if (p2set.isEmpty()) {
    ofcgb.addType( receiver, momc.context(), receiver.getType(), null );
}

the node appears in the CFG.


Could you explain a bit, what the PointsToSet is in that context, and
why it is needed?

Can you think of some configuration I missed, which results in this problem?


Thank you very much in advance!

Dennis Titze


More information about the Soot-list mailing list