[Soot-list] Crash on creating an ExceptionalBlockGraph

Samanwita Pal spal at ucdavis.edu
Wed Mar 30 17:59:36 EDT 2016


Hi,

I am trying to get hold of all the basic blocks in the body of the function
and identifying if they correspond to a cat block or not.

Whenever my test file has an explicit throw statement, the following line
in my CustomSceneAnalysis fails :

BlockGraph bg = new ExceptionalBlockGraph(b);

where Body b = m.getActiveBody(); is executed somewhere before that.

The stack trace is :

java.lang.IllegalStateException: UnitThrowAnalysis StmtSwitch: type of
throw argument is not a RefType!

at
soot.toolkits.exceptions.AbstractThrowAnalysis.mightThrowExplicitly(AbstractThrowAnalysis.java:65)

at
soot.toolkits.exceptions.UnitThrowAnalysis$UnitSwitch.caseThrowStmt(UnitThrowAnalysis.java:706)

at soot.jimple.internal.JThrowStmt.apply(JThrowStmt.java:70)

at
soot.toolkits.exceptions.UnitThrowAnalysis.mightThrow(UnitThrowAnalysis.java:241)

at
soot.toolkits.graph.ExceptionalUnitGraph$1.getThrowables(ExceptionalUnitGraph.java:807)

at
soot.toolkits.graph.ExceptionalBlockGraph.collectDests(ExceptionalBlockGraph.java:259)

at
soot.toolkits.graph.ExceptionalBlockGraph.buildExceptionDests(ExceptionalBlockGraph.java:217)

at
soot.toolkits.graph.ExceptionalBlockGraph.buildBlocks(ExceptionalBlockGraph.java:183)

at soot.toolkits.graph.BlockGraph.<init>(BlockGraph.java:69)

at
soot.toolkits.graph.ExceptionalBlockGraph.<init>(ExceptionalBlockGraph.java:106)

at
soot.toolkits.graph.ExceptionalBlockGraph.<init>(ExceptionalBlockGraph.java:93)

at
myCustomAnalysis$mySceneTransformer.internalTransform(myCustomAnalysis.java:65)

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

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

at soot.ScenePack.internalApply(ScenePack.java:40)

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

at soot.PackManager.runWholeProgramPacks(PackManager.java:565)

at soot.PackManager.runPacksNormally(PackManager.java:457)

at soot.PackManager.runPacks(PackManager.java:392)

at soot.Main.run(Main.java:271)

at soot.Main.main(Main.java:147)

at myCustomAnalysis.main(myCustomAnalysis.java:23)



Any pointers to why this is happening or how to avoid it will be helpful.

Thanks,
Samanwita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160330/adf02a25/attachment.html 


More information about the Soot-list mailing list