[Soot-list] Class soot.jimple.Jimple doesn't have method newVirtualInvokeExpr([soot.Local, soot.SootMethod, java.util.List]) : soot.jimple.VirtualInvokeExpr; failed to resolve in superclasses and interfaces

Ondrej Lhotak olhotak at uwaterloo.ca
Mon Jan 30 16:27:34 EST 2006


The error message means what it says:

Class
soot.jimple.Jimple doesn't have method newVirtualInvokeExpr([soot.Local,
soot.SootMethod, java.util.List]) : soot.jimple.VirtualInvokeExpr

Old versions of Soot has such a method. In new versions of Soot, the
method has been replaced with one that takes a SootMethodRef instead
of a SootMethod.

Since you get this message, it means that Spark has found a call to the
old method in the code that it's analyzing, but it hasn't found the old
method itself. This can happen if you have a mix of inconsistent class
files on your classpath. For example, some class files were compiled
when the old Soot was on your classpath, and contain calls to the
old method, yet the class file containing soot.jimple.Jimple on your
classpath is newer, and doesn't contain the method anymore.

To avoid this problem, make sure your Soot classpath contains only
classes that were all compiled together.

Ondrej

On Fri, Jan 27, 2006 at 10:44:00AM -0500, Aiwu Shi wrote:
> 
> hi,
>    I use a simple program to test my points-to analysis.
>  
> I am not extending Soot in the recommended way, but just calling into
> Soot/Spark directly.
> 
> so, I add the following lines before my loading application classes into
> Scene.
>          soot.options.Options.v().set_whole_program(true);
>          Scene.v().loadBasicClasses();
> unfortunately, I got exception messeage:
>  
> [Call Graph] For information on where the call graph may be incomplete, use the
> verbose option to the cg phase.
> Exception in thread "main"
> soot.AbstractSootMethodRef$ClassResolutionFailedException: Class
> soot.jimple.Jimple doesn't have method newVirtualInvokeExpr([soot.Local,
> soot.SootMethod, java.util.List]) : soot.jimple.VirtualInvokeExpr; failed to
> resolve in superclasses and interfacesLooking in soot.jimple.Jimple which has
> methods...........
>  at soot.AbstractSootMethodRef.resolve(AbstractSootMethodRef.java:136)
>  at soot.AbstractSootMethodRef.resolve(AbstractSootMethodRef.java:95)
>  at soot.jimple.internal.AbstractInvokeExpr.getMethod(AbstractInvokeExpr.java:
> 55)
>  at soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.getImplicitTargets
> (OnFlyCallGraphBuilder.java:235)
>  at soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod
> (OnFlyCallGraphBuilder.java:183)
>  at soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables
> (OnFlyCallGraphBuilder.java:81)
>  at soot.jimple.toolkits.callgraph.CallGraphBuilder.build
> (CallGraphBuilder.java:87)
>  at soot.jimple.spark.builder.ContextInsensitiveBuilder.build
> (ContextInsensitiveBuilder.java:83)
>  at soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:
> 53)
>  at soot.SceneTransformer.transform(SceneTransformer.java:39)
>  at Main.main(Main.java:67)
>  
> my main class is followed:
>  
> public class Main {
>  
>  /**
>   * @param args
>   */
>  public static void main(String[] args) {
>   Map options = new HashMap();
>      
>   soot.options.Options.v().set_whole_program(true);
>   Scene.v().loadBasicClasses();
>        
>   SootClass sc = Scene.v().loadClassAndSupport("DependenceIndusImpl");
>   Scene.v().setEntryPoints(sc.getMethods());
>    
>        
>   //set the PointsToAnalysis with phase options
>   options.put("enabled", "true");
>   options.put("on-fly-cg", "false");
>   options.put("set-impl", "hybrid");
>   options.put("propagator", "worklist");
>   options.put("verbose", "true");
>   options.put("ignoreBaseObjects", "true");
>   
>     SparkTransformer.v().transform("cg.spark",options);
>   
>   System.out.println("spark is over-----------------------");
>     
>  
>  }
>  
> }
>  
>  
> everyboday can help me?  I post the same question yesterday, but no response.
>  
> thanks
>   Aiwu

> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list



More information about the Soot-list mailing list