[Soot-list] Question about soot.jimple.toolkits.infoflow package

Richard L. Halpert richhal22 at gmail.com
Tue Apr 9 01:40:12 EDT 2013


Yes, that change is consistent with how getInvokeInfoFlowSummary() works.

-Richard
On Apr 8, 2013 6:47 PM, "Jiaqi Tan" <jiaqit at andrew.cmu.edu> wrote:

> Hi Richard,
>
> I am looking for a constant propagation analysis.
>
> Yes, I am using Spark for points-to analysis.
>
> I downloaded the latest branch of Soot from git and I got the
> following error message:
> Exception in thread "main" java.lang.NullPointerException
> at
> soot.jimple.toolkits.infoflow.SmartMethodInfoFlowAnalysis.handleInvokeExpr(SmartMethodInfoFlowAnalysis.java:411)
> at
> soot.jimple.toolkits.infoflow.SmartMethodInfoFlowAnalysis.addFlowToCdfg(SmartMethodInfoFlowAnalysis.java:826)
> at
> soot.jimple.toolkits.infoflow.SmartMethodInfoFlowAnalysis.generateAbbreviatedInfoFlowGraph(SmartMethodInfoFlowAnalysis.java:154)
> at
> soot.jimple.toolkits.infoflow.SmartMethodInfoFlowAnalysis.<init>(SmartMethodInfoFlowAnalysis.java:131)
> at
> soot.jimple.toolkits.infoflow.ClassInfoFlowAnalysis.getMethodInfoFlowAnalysis(ClassInfoFlowAnalysis.java:57)
> .... (my own code) ...
>
> I'm not sure if the following change in
> InfoFlowAnalysis.getInvokeInfoFlowSummary() would be acceptable:
>
> Currently getInvokeInfoFlowSummary() can return null if the Stmt
> passed to the method has no edges out of it. I modified
> getInvokeInfoFlowSummary() to return a new HashMutableDirectedGraph if
> ret is still null at the return statement. Is that consistent with
> what getInvokeInfoFlowSummary() is trying to do?
>
> Thanks,
> Jiaqi
>
> On Mon, Apr 8, 2013 at 2:28 PM, Richard L. Halpert <richhal22 at gmail.com>
> wrote:
> > It looks like you might not be using the latest code.  This code was last
> > updated in July 2010, and since then line 415 in
> > SmartMethodInfoFlowAnalysis.java has been a blank line.
> >
> > Additionally, are you using Spark for points-to analysis?  You need to
> use
> > Spark for the infoflow package to work, but I know that this
> precondition is
> > not carefully checked.
> >
> > -Richard
> >
> >
> > On Mon, Apr 8, 2013 at 10:56 AM, Richard L. Halpert <richhal22 at gmail.com
> >
> > wrote:
> >>
> >> The code has been used a bit since then, but hasn't been carefully
> >> maintained.  Jiangfan Shi (cc'd) is probably its most recent user.
> >>
> >> What are you trying to do?  The infoflow package can do things similar
> to
> >> escape-analysis, but you're likely better off using Heros since it is a
> more
> >> principled (and I suspect more efficient) approach to whole-program data
> >> flow.
> >>
> >> -Richard
> >>
> >>
> >>
> >> On Sun, Apr 7, 2013 at 11:40 PM, Eric Bodden <eric.bodden at ec-spride.de>
> >> wrote:
> >>>
> >>> Hi Jiaqi Tan.
> >>>
> >>> This code is from 2007 and AFAIK has not been used since. It could
> >>> well be that it does not work any more.
> >>>
> >>> In case you are looking for a taint analysis: We will probably be
> >>> releasing an implementation based on Heros and Soot in early May.
> >>>
> >>> Eric
> >>>
> >>> On 7 April 2013 22:10, Jiaqi Tan <tanjiaqi at gmail.com> wrote:
> >>> > Hi,
> >>> >
> >>> > I have some questions about trying to get the various analyses in the
> >>> > soot.jimple.toolkits.infoflow package to work.
> >>> >
> >>> > I noticed that in InfoFlowAnalysis, the
> doApplicationClassesAnalysis()
> >>> > method is commented out, is there a bug or problem with the method?
> >>> >
> >>> > Also, I tried doing this in the internalTransform() of a
> >>> > SceneTransformer:
> >>> >
> >>> > Iterator<SootClass> appClassIter =
> >>> > Scene.v().getApplicationClasses().iterator();
> >>> > while (appClassIter.hasNext()) {
> >>> >      Iterator<SootMethod> mtdIter =
> >>> > appClassIter.next().methodIterator();
> >>> >      while (mtdIter.hasNext()) {
> >>> >           SootMethod currMtd = mtdIter.next();
> >>> >           DirectedGraph flowSummary =
> >>> > ifa.getMethodInfoFlowSummary(currMtd);
> >>> >           InfoFlowAnalysis.printInfoFlowSummary(flowSummary);
> >>> >      }
> >>> > }
> >>> >
> >>> > And I got an NPE in:
> >>> > Exception in thread "main" java.lang.NullPointerException
> >>> > at
> >>> >
> soot.jimple.toolkits.infoflow.SmartMethodInfoFlowAnalysis.handleInvokeExpr(SmartMethodInfoFlowAnalysis.java:415)
> >>> > at
> >>> >
> soot.jimple.toolkits.infoflow.SmartMethodInfoFlowAnalysis.addFlowToCdfg(SmartMethodInfoFlowAnalysis.java:830)
> >>> > at
> >>> >
> soot.jimple.toolkits.infoflow.SmartMethodInfoFlowAnalysis.generateAbbreviatedInfoFlowGraph(SmartMethodInfoFlowAnalysis.java:154)
> >>> > at
> >>> >
> soot.jimple.toolkits.infoflow.SmartMethodInfoFlowAnalysis.<init>(SmartMethodInfoFlowAnalysis.java:131)
> >>> > at
> >>> >
> soot.jimple.toolkits.infoflow.ClassInfoFlowAnalysis.getMethodInfoFlowSummary(ClassInfoFlowAnalysis.java:89)
> >>> > at
> >>> >
> soot.jimple.toolkits.infoflow.InfoFlowAnalysis.getMethodInfoFlowSummary(InfoFlowAnalysis.java:112)
> >>> > at
> >>> >
> soot.jimple.toolkits.infoflow.InfoFlowAnalysis.getMethodInfoFlowSummary(InfoFlowAnalysis.java:108)
> >>> >
> >>> > How should I use the classes in soot.jimple.toolkits.infoflow?
> >>> >
> >>> > Thanks!
> >>> >
> >>> > Regards,
> >>> > Jiaqi Tan
> >>> > _______________________________________________
> >>> > Soot-list mailing list
> >>> > Soot-list at sable.mcgill.ca
> >>> > http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >>>
> >>>
> >>>
> >>> --
> >>> Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
> >>> Head of Secure Software Engineering Group at EC SPRIDE
> >>> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
> >>> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
> >>> _______________________________________________
> >>> Soot-list mailing list
> >>> Soot-list at sable.mcgill.ca
> >>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> >>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130408/333f3912/attachment.html 


More information about the Soot-list mailing list