[Soot-list] A question on Soot Call Graph

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Dec 6 07:44:33 EST 2006


Yes, that's correct. The problem is that your classes Foo and Bar do not
implement Runnable but extend the class Thread. Depending on the phase
options of the call graph construction, Soot can sometimes not figure
out what actual subclass of Thread is called. Since both, a and b have
declared type Thread, Soot assumes that any subtype of thread could be
receiving the start() call (which then includes Thread.start() itself).

So if you want more precision, you have to read about the phase options
for points-to analysis. That can figure out what a and b actually point
to.


Eric


> -----Original Message-----
> From: soot-list-bounces at sable.mcgill.ca [mailto:soot-list-
> bounces at sable.mcgill.ca] On Behalf Of ??
> Sent: Wednesday, December 06, 2006 1:26 AM
> To: soot-list at sable.mcgill.ca
> Subject: [Soot-list] A question on Soot Call Graph
> 
> Hi,
> I've just built a context-insensitive call graph for the following
> program using Soot CallGraphBuilder.
> 
> public class CallGraphCase {
> static class Foo extends Thread{
> public void run(){}
> }
> 
> static class Bar extends Thread{
> public void run(){}
> }
> 
> public static void main(String[] args) { Thread a = new Foo(); Thread
b
> = new Bar();
> 
> a.start();
> b.start();
> }
> }
> 
> Now it seems that the CallGraphCase.main() can directly call
> Thread.start(), Foo.run() and Bar.run(). While in my opinion, the
> CallGraphCase.main() should firstly call Thread.start(), and then
> Thread.start() call Foo.run() or Bar.run(). Could anyone give me some
> explanation on how soot handles threads in a call graph.
> 
> Thanks very much!
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list


More information about the Soot-list mailing list