[Soot-list] use-original-names bug

Phil Pratt-Szeliga pcpratts at chirrup.org
Tue Aug 7 10:17:51 EDT 2012


Hello,

> That is not a bug. You are not supposed to use variable names for Jimple
> variable equality, and Jimple does not guarantee that different
> variables have different names. It doesn't matter because the variable
> names don't get used when the code gets written out as bytecode.

This test case causes the same problem [1] I am facing with my test
case. My command line options [2] dump the html from spark. Apparently
this must depend on the local names being unique. Also when I output
.class files without dump html, I get this exception [3]. And anyway,
I think that having different local names would make it easier for
parsers of the .jimple file format.

I will work today on fixing this through looking at the LocalSplitter
and surrounding code.

Phil Pratt-Szeliga
Syracuse University

[1] Exception in thread "main" java.lang.RuntimeException: failed to handle 0
	at soot.jimple.spark.builder.MethodNodeFactory.defaultCase(MethodNodeFactory.java:288)
	at soot.jimple.AbstractJimpleValueSwitch.caseIntConstant(AbstractJimpleValueSwitch.java:55)
	at soot.jimple.IntConstant.apply(IntConstant.java:196)
	at soot.jimple.spark.builder.MethodNodeFactory$1.caseAssignStmt(MethodNodeFactory.java:74)
	at soot.jimple.internal.JAssignStmt.apply(JAssignStmt.java:221)
	at soot.jimple.spark.builder.MethodNodeFactory.handleStmt(MethodNodeFactory.java:67)
	at soot.jimple.spark.pag.MethodPAG.buildNormal(MethodPAG.java:181)
	at soot.jimple.spark.pag.MethodPAG.build(MethodPAG.java:147)
	at soot.jimple.spark.solver.OnFlyCallGraph.processReachables(OnFlyCallGraph.java:64)
	at soot.jimple.spark.solver.OnFlyCallGraph.build(OnFlyCallGraph.java:56)
	at soot.jimple.spark.solver.PropWorklist.handleVarNode(PropWorklist.java:123)
	at soot.jimple.spark.solver.PropWorklist.propagate(PropWorklist.java:53)
	at soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:152)
	at soot.SceneTransformer.transform(SceneTransformer.java:39)
	at soot.Transform.apply(Transform.java:89)
	at soot.RadioScenePack.internalApply(RadioScenePack.java:57)
	at soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPack.java:49)
	at soot.Pack.apply(Pack.java:114)
	at soot.PackManager.runWholeProgramPacks(PackManager.java:454)
	at soot.PackManager.runPacksNormally(PackManager.java:368)
	at soot.PackManager.runPacks(PackManager.java:334)
	at soot.Main.run(Main.java:198)
	at soot.Main.main(Main.java:141)

[2] java -cp sootclasses-trunk.jar:AXMLPrinter2.jar:jasminclasses-2.5.0.jar:java-cup-11a.jar
soot.Main -whole-program -f J -p cg.spark dump-html:true -p jb
use-original-names:true -pp --process-dir
sootLocalsTestcase/build/classes/

[3] Writing to sootOutput/edu/syr/pcpratts/localstestcase/TestUseOriginalNames.class
Jasmin:1: Jasmin: exception - <java.lang.NullPointerException> null..
.source
        ^
java.lang.NullPointerException
	at java_cup.runtime.lr_parser.parse(lr_parser.java:553)
	at jasmin.ClassFile.readJasmin(ClassFile.java:1157)
	at jasmin.Main.assemble(Main.java:31)
	at soot.util.JasminOutputStream.flush(JasminOutputStream.java:35)
	at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:296)
	at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:140)
	at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
	at java.io.PrintWriter.flush(PrintWriter.java:293)
	at soot.PackManager.writeClass(PackManager.java:960)
	at soot.PackManager.writeOutput(PackManager.java:512)
	at soot.PackManager.writeOutput(PackManager.java:423)
	at soot.Main.run(Main.java:199)
	at soot.Main.main(Main.java:141)
Jasmin: Found 1 errors


More information about the Soot-list mailing list