[Soot-list] Imprecise pointer analysis by Spark

Sridhar Gopinath sridhar.g at csa.iisc.ernet.in
Fri Oct 7 01:09:21 EDT 2016


Hi,
Thank you for the quick reply.

I looked into the reflection log file produced by Tamiflex. It does contain 4 log entries corresponding to the FSDirectory as follows:
Class.forName;org.apache.lucene.store.FSDirectory;org.apache.lucene.store.FSDirectory.<clinit>;109;;
Class.forName;org.apache.lucene.store.FSDirectory;org.apache.lucene.store.FSDirectory.class$;108;;
Class.newInstance;org.apache.lucene.store.FSDirectory;org.apache.lucene.store.FSDirectory.getDirectory;182;;
Constructor.newInstance;<org.apache.lucene.store.FSDirectory: void <init>()>;java.lang.Class.newInstance;;isAccessible=true;

Tamiflex is producing the log files for this class. Does this mean that Soot is not handling the log entries correctly?
I have modified the transformations in poa.properties to contain only those entries which Soot can handle.

Also, there are a few cases where in the points-to set was empty for a particular variable. I guess this also comes under the same issue that Soot might not be handling the log entries correctly.

Can you please give me some pointers on how to fix this?
Should I look into how Soot is handling reflection logs?
Can anyone of the Soot developers give me their views on this?

Thanks a lot for the help.

Regards,
Sridhar Gopinath,
Scalable Software Systems lab,
CSA, Indian Institute of Science,
Bangalore.

Regards,
Sridhar

----- Original Message -----
From: "olhotak" <olhotak at uwaterloo.ca>
To: "Sridhar Gopinath" <sridhar.g at csa.iisc.ernet.in>
Cc: "soot-list" <soot-list at CS.McGill.CA>
Sent: Thursday, October 6, 2016 7:28:29 PM
Subject: Re: [Soot-list] Imprecise pointer analysis by Spark

There are no allocation sites of the class
org.apache.lucene.store.FSDirectory
in the Lucene codebase. The class is instantiated at runtime using
reflection. You need to tell this to Spark. This can normally be done
using Soot's -dynamic-class option, but presumably the Tamiflex support
in Soot also does this. I suggest that you check the Tamiflex file to
see whether it mentions this class. If it does not, then the problem is
with the Tamiflex dynamic monitoring. If it does, then the problem is
with the Soot Tamiflex support not correctly considering the dynamically
loaded class.

Ondřej

On Thu, Oct 06, 2016 at 03:49:35PM +0530, Sridhar Gopinath wrote:
> Hi,
> 
> I am trying to do pointer-analysis on DaCapo-9.12-bach benchmark with Soot and Tamiflex.
> I want to get the set of classes an object may point to at runtime.
> 
> I get this information by doing 'Scene.v().getPointsToAnalysis().reachingObjects(local).possibleTypes();'.
> 
> On luindex, I see that the possibleTypes() is being imprecise i.e. the runtime class is not present in the set of possible types.
> 
> Complete details:
> Method: org.apache.lucene.store.IndexInput.readVInt()
> Callsite: this.readByte();
> 
> Spark reported possible class types for 'this' local:
> org.apache.lucene.index.CompoundFileReader$CSIndexInput
> org.apache.lucene.store.ChecksumIndexInput
> org.apache.lucene.index.ByteSliceReader
> 
> Actual runtime class:
> org.apache.lucene.store.FSDirectory$FSIndexInput
> 
> Can anyone please help me in understanding why Spark is being imprecise and how do I rectify this?
> Does using Paddle or setting any phase options for Spark help?
> Any help is greatly appreciated.
> Thanks.
> 
> 
> My command line arguments are:
> java -cp soot-trunk.jar:bin/ Analysis.Main -w -app -pp -p cg.spark enabled:true -p cg reflection-log:out/refl.log -p jb use-original-names:true -include org.apache. -include org.w3c. -keep-line-number -no-bodies-for-excluded -cp out/:jar/hook.jar -main-class Harness Harness -f class -output-dir sootified -validate
> 
> Regards,
> Sridhar Gopinath,
> Scalable Software Systems lab,
> CSA, Indian Institute of Science,
> Bangalore.
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>


More information about the Soot-list mailing list