[Soot-list] problem computing call graph

Neil Walkinshaw Neil.Walkinshaw at cis.strath.ac.uk
Sat May 28 07:18:33 EDT 2005


Hi,

 

I have encountered an error when I try to use Soot to analyse JEdit (using
the latest version of Soot). I load the required classes by using
Scene.v().addBasicClass and Scene.v().loadNecessaryClasses. I then use the
following code snippet (using CHA) to generate a call graph (having selected
a single entry point):

 

Map sootOptions = new HashMap();

sootOptions.put("vta", "false");

sootOptions.put("enabled", "true");

sootOptions.put("on-fly-cg", "true");

sootOptions.put("set-impl", "double");

sootOptions.put("verbose", "true");

CHATransformer.v().transform("cg.cha", sootOptions);

 

This has worked for several applications, but when I try to use it with
JEdit, it works properly for a while but then gives me this exception:

 

java.lang.RuntimeException: soot.jimple.toolkits.typing.TypeException:
soot.jimple.toolkits.typing.ConstraintChecker$RuntimeTypeException: Type
Error(27)

      at
soot.jimple.toolkits.typing.ConstraintChecker.error(ConstraintChecker.java:7
8)

      at
soot.jimple.toolkits.typing.ConstraintChecker.caseAssignStmt(ConstraintCheck
er.java:520)

      at soot.jimple.internal.JAssignStmt.apply(JAssignStmt.java:222)

      at
soot.jimple.toolkits.typing.ConstraintChecker.check(ConstraintChecker.java:5
6)

      at
soot.jimple.toolkits.typing.TypeResolver.check_and_fix_constraints(TypeResol
ver.java:843)

      at
soot.jimple.toolkits.typing.TypeResolver.resolve_step_3(TypeResolver.java:31
6)

      at
soot.jimple.toolkits.typing.TypeResolver.resolve(TypeResolver.java:205)

      at
soot.jimple.toolkits.typing.TypeAssigner.internalTransform(TypeAssigner.java
:57)

      at soot.BodyTransformer.transform(BodyTransformer.java:51)

      at soot.Transform.apply(Transform.java:104)

      at soot.JimpleBodyPack.applyPhaseOptions(JimpleBodyPack.java:70)

      at soot.JimpleBodyPack.internalApply(JimpleBodyPack.java:93)

      at soot.Pack.apply(Pack.java:120)

      at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:115)

      at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:80)

      at soot.SootMethod.retrieveActiveBody(SootMethod.java:304)

      at
soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod(OnFlyC
allGraphBuilder.java:182)

      at
soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables(OnFly
CallGraphBuilder.java:81)

      at
soot.jimple.toolkits.callgraph.CallGraphBuilder.build(CallGraphBuilder.java:
94)

      at
soot.jimple.spark.builder.ContextInsensitiveBuilder.build(ContextInsensitive
Builder.java:83)

      at
soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:5
3)

      at soot.SceneTransformer.transform(SceneTransformer.java:39)

 

The same happens when I use spark to construct the call graph. Is there any
workaround for this?

 

Thanks,

 

Neil Walkinshaw

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20050528/c9110f27/attachment.htm


More information about the Soot-list mailing list