[Soot-list] Soot exception during call graph build phase

Andrea Mattavelli andrea.mattavelli at usi.ch
Wed Jan 18 08:15:51 EST 2012


Hi Eric,
thanks for your response, that's exactly what I think.

org.omegat.gui.editor.IEditor is an interface and Soot recognize <java.lang.String getCurrentFile()> as a non concrete method correctly.

I'm currently invoking Soot as follow (they are two pieces of non consecutive code):

	Options.v().set_allow_phantom_refs(true);
	Options.v().keep_line_number();
	Options.v().set_whole_program(true);
	Options.v().set_soot_classpath([…]);

[…]

	ArrayList<SootMethod> applMethods = new ArrayList<SootMethod>();
	Set<Entry<SootClass, ArrayList<SootMethod>>> entries = ClassRegistry.getInstance().getClasses().entrySet();
	for (Entry<SootClass, ArrayList<SootMethod>> entry : entries) {
		applMethods.addAll(entry.getValue());
	}
	Scene.v().setEntryPoints(applMethods);
	Scene.v().loadNecessaryClasses();
		
	// build call graph
	CallGraphBuilder cgBuilder = new CallGraphBuilder();
	cgBuilder.build();
	CallGraph callGraph = Scene.v().getCallGraph();


What am I doing wrong?
Thank you very much for your help!

Andrea

On 18-gen-2012, at 13:00, Eric Bodden wrote:

> Hi Andreas.
> 
>> I checked the OnFlyCallGraphBuilder code and I found that into processReachables() and processNewMethod(SootMethod m) there are no checks to verify that the processed method is concrete.
>> Is it the code "buggy" or am I invoking the call graph builder in the wrong way?
> 
> I would be surprised if this code was buggy; we should have seen this
> issue long before then. What's the status of
> org.omegat.gui.editor.IEditor: java.lang.String getCurrentFile() ? Is
> it an abstract or native method or is it just a regular one?
> 
> Also, how are you invoking the analysis?
> 
> Eric



More information about the Soot-list mailing list