[Soot-list] Help with NPE PointsToAnalysis.reachingObjects(Context, Local) using Heros/Spark+Geom
Henddher Pedroza
hpedro2 at uic.edu
Mon May 20 09:48:33 EDT 2013
Hello,
Any suggestions?
On May 17, 2013, at 10:58 AM, Henddher Pedroza <hpedro2 at uic.edu> wrote:
> Hello all:
>
> Using Heros in combination with SPARK w/Geom (*), I am getting an NPE in CallGraph.findEdge(Unit, SootMethod) @ line 123 called from GeomPointsTo.reachingObjects(Context, Local) @ line 1504:
>
> (*) cmd-line options:
> -p cg all-reachable:true,verbose:true,safe-forname:true,safe-newinstance:true -p cg.spark enabled:true,verbose:true,geom-pta:true,geom-eval:2
>
> GeomPointsTo.reachingObjects(Context, Local):
> 1504: Edge e = Scene.v().getCallGraph().findEdge((Unit)c, callee);
>
> CallGraph.findEdge(Unit, SootMethod):
> Edge findEdge( Unit u, SootMethod callee )
> {
> Edge e = srcUnitToEdge.get(u);
> 123: while ( e.srcUnit() == u && // <<<< NPE, e is null
>
> For my test, I am using one explicit entry point, discarding all default entry-points configured by Soot.
> My entry-point is a static method (staticFakeEntryPoint) which instantiates one obj of the class I am testing. Then, in my interesting method doSomething(), I perform a field assignment and request PointsToAnalysis.reachingObjects(Context, Local) (see "<<<<" below). Context is the current statement "stmt" (r0.<MyClass: java.lang.String dummy> = $r3) and Local is "r0" (obtained through stmt.getDefBoxes().getValue().getBase() more or less)
>
> MyClass {
> String dummy;
> void static staticFakeEntryPoint() {
> MyClass anObj = new MyClass();
> anObj.doSomething();
> }
> void doSomething() {
> this.dummy = doSomethingElse(); // <<<< jimple: r0.<MyClass: java.lang.String dummy> = $r3
> }
> }
>
> Am I incorrectly using pointsToAnalysis.reachingObjects(Context, Local) or incorrectly configuring Spark?
>
> Why would srcUnitToEdge be lacking that edge?
>
> Any help is appreciated.
>
> - Henddher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130520/0769a690/attachment.html
More information about the Soot-list
mailing list