[Soot-list] (GeomPointsTo) Spark PTA Re-analysis

Michael Gordon mgordon at mit.edu
Fri Apr 5 09:04:34 EDT 2013


Thanks Xiao, based on your advice, I will be switching to the github repo.

Cheers,
Michael


On Fri, Apr 5, 2013 at 1:10 AM, Richard Xiao <richardxx at cse.ust.hk> wrote:

>
> Hi, Michael:
>
> I'm glad to hear that you solve the problem.
>
> As I know, it's a long time the soot team plans to release soot 2.6,
> because many bugs have been fixed since 2.5. Eric is careful of every
> commitment to soot. Therefore, don't worry too much about the development
> version quality.
>
> And, the geomPTA is also updated significantly since 2.5. It's more
> efficient and a bug for analyzing programs with more than 2^63 contexts is
> fixed.
>
> Cheers,
> Xiao
>
>
>
> On Wed, Apr 3, 2013 at 10:38 PM, Michael Gordon <mgordon at mit.edu> wrote:
>
>> Hello Xiao,
>>
>> Thank you so much for your prompt help!  This indeed did fix the problem
>> for me.  I will inspect the analysis result to make sure it is correct.
>>  Funny, that I was experimenting with this global, but I must have released
>> too much state in combination with it.
>>
>> Regarding your suggestion of using the development version, currently,
>> I'm using Soot 2.5, the newest version on the soot downloads page.  Should
>> I instead switch to the github version?  Is it stable?
>>
>> Best,
>> Michael
>>
>>
>> On Wed, Apr 3, 2013 at 4:41 AM, Richard Xiao <richardxx at cse.ust.hk>wrote:
>>
>>> Hi, Michael:
>>>
>>> Now I found the root cause.
>>> The problem is because SPARK caches the analyzed methods in a global
>>> field "G.v().MethodPAG_methodToPag". Therefore, if you don't clean the
>>> cache, the methods are analyzed again in your second PTA. Since geomPTA
>>> obtains program information from SPARK and SPARK contains no program
>>> information in the second run (because SPARK skips all analyzed methods in
>>> the cache), geomPTA crashes due to uninitialized variables. Just add a line:
>>>
>>> G.v().MethodPAG_methodToPag = new HashMap<SootMethod, MethodPAG>();
>>>
>>> before your "SparkTransformer.v().transform("",opt);", your problem is
>>> solved. Please try it out.
>>>
>>>
>>> Cheers,
>>> Xiao
>>>
>>>
>>>
>>> On Tue, Apr 2, 2013 at 11:49 PM, Michael Gordon <mgordon at mit.edu> wrote:
>>>
>>>> Hello Xiao,
>>>>
>>>> I initially tried just to release the CG and the PTA, but it did not
>>>> work.  Here is the error I am receiving:
>>>>
>>>> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
>>>> at java.util.ArrayList.get(ArrayList.java:324)
>>>> at
>>>> soot.jimple.spark.geom.geomPA.OfflineProcessor.add_graph_edge(OfflineProcessor.java:541)
>>>> at
>>>> soot.jimple.spark.geom.geomPA.OfflineProcessor.buildInstanceAssignmentGraph(OfflineProcessor.java:147)
>>>> at
>>>> soot.jimple.spark.geom.geomPA.OfflineProcessor.runOptimizations(OfflineProcessor.java:85)
>>>> at
>>>> soot.jimple.spark.geom.geomPA.GeomPointsTo.solve(GeomPointsTo.java:995)
>>>> at
>>>> soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:188)
>>>> at soot.SceneTransformer.transform(SceneTransformer.java:39)
>>>>
>>>>
>>>> At this point, my main method is quite large, and has a lot
>>>> transformation.  I do not have a simple version to demonstrate this bug.
>>>>  However, my consecutive calls to PTA look like this:
>>>>
>>>> ...
>>>> runPTA();
>>>> Scene.v().releaseCallGraph();
>>>> Scene.v().releasePointsToAnalysis();
>>>> runPTA();
>>>> ...
>>>>
>>>> public static void runPTA() {
>>>>
>>>> HashMap opt = new HashMap();
>>>>
>>>> opt.put("geom-pta","true");
>>>>
>>>> opt.put("geom-encoding", "geom");
>>>>
>>>> opt.put("geom-worklist", "PQ");
>>>>
>>>> opt.put("geom-eval", "0");
>>>>
>>>> opt.put("geom-trans", "false");
>>>>
>>>> opt.put("geom-frac-base", "40");
>>>>
>>>> opt.put("geom-blocking", "true");
>>>>
>>>> opt.put("geom-runs", "1");
>>>>
>>>> opt.put("enabled","true");
>>>>
>>>> opt.put("verbose","false");
>>>>
>>>> opt.put("ignore-types","true");
>>>>
>>>> opt.put("force-gc","false");
>>>>
>>>> opt.put("pre-jimplify","false");
>>>>
>>>> opt.put("vta","false");
>>>>
>>>> opt.put("rta","false");
>>>>
>>>> opt.put("field-based","false");
>>>>
>>>> opt.put("types-for-sites","false");
>>>>
>>>> opt.put("merge-stringbuffer","false");
>>>>
>>>> opt.put("string-constants","true");
>>>>
>>>> opt.put("simulate-natives","true");
>>>>
>>>> opt.put("simple-edges-bidirectional","false");
>>>>
>>>> opt.put("on-fly-cg","true");
>>>>
>>>> opt.put("simplify-offline","false");
>>>>
>>>> opt.put("simplify-sccs","false");
>>>>
>>>> opt.put("ignore-types-for-sccs","false");
>>>>
>>>> opt.put("propagator","worklist");
>>>>
>>>> opt.put("set-impl","double");
>>>>
>>>> opt.put("double-set-old","hybrid");
>>>>
>>>> opt.put("double-set-new","hybrid");
>>>>
>>>> opt.put("dump-html","false");
>>>>
>>>> opt.put("dump-pag","false");
>>>>
>>>> opt.put("dump-solution","false");
>>>>
>>>> opt.put("topo-sort","false");
>>>>
>>>> opt.put("dump-types","true");
>>>>
>>>> opt.put("class-method-var","true");
>>>>
>>>> opt.put("dump-answer","false");
>>>>
>>>> opt.put("add-tags","false");
>>>>
>>>> opt.put("set-mass","false");
>>>>
>>>> SparkTransformer.v().transform("",opt);
>>>>
>>>> }
>>>>
>>>> Any thoughts on the above error?  I can work on creating a smaller main
>>>> driver that recreates the problem if no one has suggestions.
>>>>
>>>> Cheers!
>>>> Michael
>>>>
>>>> ---
>>>>
>>>>
>>>> Hi, Michael:
>>>>
>>>> The problem is you release important information that is needed by
>>>> points-to analysis. For example, "releaseFastHierarchy" destroys the
>>>> type
>>>> inheritance graph, which is used by either SPARK or Geom.
>>>>
>>>> Please just try releasing only the CallGraph and the PointsToAnalysis
>>>> after
>>>> your transformation. If it doesn't work neither, please show us your
>>>> full
>>>> main function that we can reproduce your failure.
>>>>
>>>> Cheers,
>>>> Xiao
>>>>
>>>> --
>>>> Michael Gordon, PhD
>>>> Research Scientist, MIT CSAIL
>>>> http://people.csail.mit.edu/mgordon
>>>> Program Head, MIT AITI
>>>> http://aiti.mit.edu
>>>>
>>>> _______________________________________________
>>>> Soot-list mailing list
>>>> Soot-list at sable.mcgill.ca
>>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>>>
>>>>
>>>
>>>
>>> --
>>> Richard Xiao Xiao
>>> PhD Student @ CSE @ Hong Kong University of Science and Technology
>>> www.cse.ust.hk/~richardxx
>>>
>>
>>
>>
>> --
>> Michael Gordon, PhD
>> Research Scientist, MIT CSAIL
>> http://people.csail.mit.edu/mgordon
>> Program Head, MIT AITI
>> http://aiti.mit.edu
>>
>
>
>
> --
> Richard Xiao Xiao
> PhD Student @ CSE @ Hong Kong University of Science and Technology
> www.cse.ust.hk/~richardxx
>



-- 
Michael Gordon, PhD
Research Scientist, MIT CSAIL
http://people.csail.mit.edu/mgordon
Program Head, MIT AITI
http://aiti.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130405/80d2805b/attachment-0001.html 


More information about the Soot-list mailing list