[Soot-list] Missing edges in Call Graph

Marc-Andre Laverdiere-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Thu May 9 15:46:35 EDT 2013


Hello,

I would say two things that are very common:
1) Try using the develop branch on github
2) Are your entry points static?

On 2013-05-09 15:29, salim bansal wrote:
> Hi,
>
> I am using soot to build call graph for java applications.
> It's working fine except that in the following case it doesn't capture
> the call
> .......
> foo(){
>   ((MyClass)getObject()).myMethod();
> }
>
> where getObject() returns an instance of class java.lang.Object
> But I am unable to see an edge from foo() to myMethod().
> While the following code gets the edge
> foo(){
>     (new MyClass()).myMethod();
> }
>
> I have attached a small java program exercising this scenario.
> The methods called on aChildTwo field variable of class SootTest
> are unreachable as I do an explicit cast to ChildTwo after getting
> an Object from getObject.
> it can be run like this
>
> javac -cp .:../soot-2.5.0.jar *.java
>
> java -cp .:../soot-2.5.0.jar Driver
>
> and it prints the reachable methods from SootTest.main(String args[]).
>
> Am I missing something on how to get these kind of edges?
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


-- 
Marc-André Laverdière-Papineau
Doctorant - PhD Candidate




More information about the Soot-list mailing list