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

Eric Bodden eric.bodden at ec-spride.de
Wed Jan 18 09:56:32 EST 2012


Hi Andrea.

This may be a side-effect of the phantom-refs option, but I a not
sure. Instead of writing your own driver class and calling
CallGraphBuilder yourself, have you tried just calling
soot.Main.main(..) and accessing the call graph from within a
SceneTransformer? That should leave less room for error on your side.

Eric

On 18 January 2012 14:15, Andrea Mattavelli <andrea.mattavelli at usi.ch> wrote:
> 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
>



-- 
Eric Bodden, Ph.D., http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Principal Investigator in Secure Services at CASED
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt


More information about the Soot-list mailing list