[Soot-list] Recarding spark

Ding Li dingli at usc.edu
Mon Jul 6 22:01:00 EDT 2015


Hi I have encountered some problem with spark:
My code is like this:

Options.v().set_src_prec(Options.src_prec_apk);
Options.v().set_android_jars(androidpath);
Options.v().set_whole_program(true);
Options.v().set_verbose(false);
Options.v().setPhaseOption("cg.spark", "on");
Options.v().set_output_format(Options.src_prec_J);
Options.v().set_keep_line_number(true);
Options.v().set_keep_offset(true);
Options.v().set_allow_phantom_refs(true);
Options.v().set_process_dir(path_list);
Scene.v().loadNecessaryClasses();
Scene.v().setEntryPoints(entryPoints);
PackManager.v().runPacks();
PAG pag=(PAG)Scene.v().getPointsToAnalysis();


//for any method
while (stmtIt.hasNext()) {
    Unit u = (Unit) stmtIt.next();
    Stmt stmt=(Stmt)u;

    if(stmt.containsInvokeExpr())
    {
        InvokeExpr exp = stmt.getInvokeExpr();
        if(exp.getUseBoxes().size()>1)
        {
            Value l=exp.getUseBoxes().get(0).getValue();
            if(l instanceof Local)
            {
                Node n=pag.findLocalVarNode((Local) l);
                System.out.println(n); //it is null
                PointsToSetInternal
pset=(PointsToSetInternal)pag.reachingObjects((Local) l);
                System.out.println(pset.size()); //the size is 0

            }



        }

    }
}


I initialize soot with the first half, and then for any methods, I check
the PointedToSet for the first arg of each method invocation. However, for
any , I always get size of 0 in the PointedToSet and the Node of the
argument in PAG is always null. I think at list the PointedToSet should
contain the variable itself and the size should be at least 1, instead of
empty. I am not quite sure where is wrong here, what should I set in oder
to get pag.reachingObjects return a non-empty set? Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150707/b2be12f8/attachment.html 


More information about the Soot-list mailing list