Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception fired when constructing the call graph #811

Closed
sasidv opened this issue Nov 1, 2017 · 4 comments
Closed

Exception fired when constructing the call graph #811

sasidv opened this issue Nov 1, 2017 · 4 comments

Comments

@sasidv
Copy link

sasidv commented Nov 1, 2017

Hi all,
I am constructing a call graph for an application using the method Soot.getAnalyzer().constructCallgraph(). Following exception fired when constructing the call graph. According to the suggestion given in the exception message, I use the whole program but the exception is continuously happening. Could you please help me to figure this out? If you want more information please let me know.

I set the whole configuration mode as below.
Options.v().set_whole_program(true);

Exception

Using 'D:\android-platforms-master\android-4\android.jar' as android.jar
[main] INFO soot.jimple.infoflow.android.SetupApplication - ARSC file parsing took 0.122124622 seconds
[main] INFO soot.jimple.infoflow.android.SetupApplication - Constructing the callgraph...
[Call Graph] For information on where the call graph may be incomplete, use the verbose option to the cg phase.
[main] INFO soot.jimple.infoflow.memory.MemoryWarningSystem - Shutting down the memory warning system...
java.lang.RuntimeException: This operation requires resolving level HIERARCHY but android.app.Service is at resolving level DANGLING
If you are extending Soot, try to add the following call before calling soot.Main.main(..):
Scene.v().addBasicClass(android.app.Service,HIERARCHY);
Otherwise, try whole-program mode (-w).
	at soot.SootClass.checkLevelIgnoreResolving(SootClass.java:174)
	at soot.SootClass.checkLevel(SootClass.java:155)
	at soot.SootClass.isInterface(SootClass.java:902)
	at soot.SootClass.isConcrete(SootClass.java:908)
	at soot.jimple.spark.builder.ContextInsensitiveBuilder.handleClass(ContextInsensitiveBuilder.java:119)
	at soot.jimple.spark.builder.ContextInsensitiveBuilder.build(ContextInsensitiveBuilder.java:95)
	at soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:84)
	at soot.SceneTransformer.transform(SceneTransformer.java:39)
	at soot.Transform.apply(Transform.java:90)
	at soot.RadioScenePack.internalApply(RadioScenePack.java:57)
	at soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPack.java:49)
	at soot.Pack.apply(Pack.java:118)
	at soot.jimple.infoflow.android.SetupApplication.constructCallgraphInternal(SetupApplication.java:503)
	at soot.jimple.infoflow.android.SetupApplication.calculateCallbackMethods(SetupApplication.java:613)
	at soot.jimple.infoflow.android.SetupApplication.calculateCallbacks(SetupApplication.java:430)
	at soot.jimple.infoflow.android.SetupApplication.calculateCallbacks(SetupApplication.java:398)
	at soot.jimple.infoflow.android.SetupApplication.runInfoflow(SetupApplication.java:1229)
	at soot.jimple.infoflow.android.SetupApplication.constructCallgraph(SetupApplication.java:1077) 
@sasidv
Copy link
Author

sasidv commented Nov 1, 2017

@ericbodden @StevenArzt @mbenz89 could you please help me regarding this ?

@ericbodden
Copy link
Member

Hmmm, does the class android.app.Service exist on Soot's classpath?

@sasidv
Copy link
Author

sasidv commented Nov 6, 2017

Thanks for the attention. Could you please help me to check whether the class android.app.Service on Soot's classpath ? I just configured soot options and called the method Soot.getAnalyzer().constructCallgraph() . I could construct call graph for other applications, but this particular application gives the above mentioned exception.
According to exception message, I took the both the actions suggested in the message to avoid them. But non of them help to avoid this.

  1. Added Scene.v().addBasicClass(android.app.Service,HIERARCHY);
  2. Options.v().set_whole_program(true);

I saw the same, error in soot mailing list as well. But, I couldn't find exact solution or explanation for this type of exceptions.

@pavanupb
Copy link
Collaborator

@sasidv Please re-open if this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants