[Soot-list] No Method Source Set for Method <{method signature here}>

Steven Arzt Steven.Arzt at cased.de
Fri Jul 24 12:39:34 EDT 2015


Hi Jason,

 

You are really accessing internals of Soot. This is something I would generally avoid unless you have a very thorough understanding of Soot’s inner workings. If you for instance try to load the body of a non-concrete method (which by definition cannot have a body), this will fail. Since you are accessing the loader directly, you have to take care of all of that stuff on your own.

 

Best regards,

  Steven 

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA] Im Auftrag von Jason Ott
Gesendet: Freitag, 24. Juli 2015 02:22
An: soot-list at cs.mcgill.ca
Betreff: [Soot-list] No Method Source Set for Method <{method signature here}>

 

I have a thread that identifies a class to bring into the Soot Scene.  I do so through the following method:

protected synchronized SootClass bringClassToScene(String className) {
    SootClass sootClass;
    sootClass = Scene.v().forceResolve(className, SootClass.BODIES);
    sootClass.setApplicationClass();
    return sootClass;
}

Which is invoked by means of: SootClass sootClass = bringClassToScene(className);

 

className is simply a string in the format: "path.to.package.ClassName".

 

I then try to get the active bodies of a method in the class by means of: 

for(SootMethod m : sootClass.getMethods()) {

Body body = m.retrieveActiveBody();

// do other work here

}

 

At which point I get the following error: 

 

java.lang.RuntimeException: No method source set for method <com.android.server.power.PowerManagerService$BinderService: void <init>(com.android.server.power.PowerManagerService)>

Error retrieving active body of: <com.android.server.power.PowerManagerService$BinderService: void <init>(com.android.server.power.PowerManagerService)>

 

I am using Soot with the following arguments:

-cp /path/to/classes/:/path/to/other/classes/:. -f J -w -allow-phantom-refs


I do not understand why Soot cannot fetch the active body of a given method.  This doesn't happen with every method, but I have not been able to discern any pattern.

 

Thanks,

Jason

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150724/d15c8986/attachment.html 


More information about the Soot-list mailing list