[Soot-list] Trouble building CallGraph

Eric Bodden eric.bodden at mail.mcgill.ca
Thu May 3 23:13:12 EDT 2007


Hmmm... so does your version of rt.jar actually contain that class?
Since it's a class in sun.misc and not java.*, it does not really have
to be.

Eric

On 03/05/07, Armand Navabi <anavabi at purdue.edu> wrote:
> My previous problem had too much going on.  The code below demonstrates
> the problem I am having:
>
>   public static void main(String[] args) {
>     String cp = ".:/opt/sun-jdk-1.4.2.10/jre/lib/rt.jar";
>     Scene.v().setSootClassPath(cp);
>
>     SootClass sClass = Scene.v().loadClassAndSupport(args[0]);
>     sClass.setApplicationClass();
>     Scene.v().setMainClass(sClass);
>
>     CallGraphBuilder cgb = new CallGraphBuilder(DumbPointerAnalysis.v());
>     cgb.build(); // <-- EXCEPTION
>
>     CallGraph cg = Scene.v().getCallGraph();
>  }
>
> On the line with that says EXCEPTION, I get the following exception only
> when the code I am analyzing has a call to a library class
> (System.out.println).
>
> Exception in thread "main" java.lang.RuntimeException:
> Aborting: can't find classfile sun.misc.Version
>         at soot.Scene.getSootClass(Scene.java:374)
>         at soot.coffi.CFG.generateJimple(CFG.java:4647)
>         at soot.coffi.CFG.jimplify(CFG.java:1464)
>         at soot.coffi.CFG.jimplify(CFG.java:1127)
>         at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:98)
>         at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:80)
>         at soot.SootMethod.retrieveActiveBody(SootMethod.java:304)
>         at
> soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod(OnFlyCallGraphBuilder.java:182)
>         at
> soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables(OnFlyCallGraphBuilder.java:81)
>         at
> soot.jimple.toolkits.callgraph.CallGraphBuilder.build(CallGraphBuilder.java:87)
>         at analysis.test.Test.main(Test.java:21)
>
> It seems to me that rt.jar should be in my Soot classpath (first two
> lines of method).
>
> Thanks,
> Armand
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list