[Soot-list] Missing edges in Call Graph

salim bansal salim.bansal at gmail.com
Thu May 9 15:29:11 EDT 2013


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130509/24b821ed/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Driver.java
Type: application/octet-stream
Size: 2215 bytes
Desc: not available
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130509/24b821ed/attachment.obj 


More information about the Soot-list mailing list