[Soot-list] Rev 3716 Bug

Aaloan Miftah aaloanmiftah at yahoo.com
Wed May 30 15:08:08 EDT 2012


There is an issue with the patch submitted by Phil Pratt-Szeliga, stack trace and test code is below

Exception in thread "main" java.lang.NullPointerException
at soot.PatchingChain.insertBefore(PatchingChain.java:140)
at soot.shimple.internal.SPatchingChain.insertBefore(SPatchingChain.java:173)
at soot.PatchingChain.insertBefore(PatchingChain.java:1)
at soot.toolkits.graph.Block.insertBefore(Block.java:129)
at soot.shimple.internal.PhiNodeManager.prependTrivialPhiNode(PhiNodeManager.java:183)
at soot.shimple.internal.PhiNodeManager.insertTrivialPhiNodes(PhiNodeManager.java:151)
at soot.shimple.internal.ShimpleBodyBuilder.transform(ShimpleBodyBuilder.java:99)
at soot.shimple.ShimpleBody.rebuild(ShimpleBody.java:133)
at soot.shimple.ShimpleBody.<init>(ShimpleBody.java:102)
at soot.shimple.Shimple.newBody(Shimple.java:88)
at soot.PackManager.runBodyPacks(PackManager.java:762)
at soot.PackManager.runBodyPacks(PackManager.java:464)
at soot.PackManager.runBodyPacks(PackManager.java:381)
at soot.PackManager.runPacks(PackManager.java:358)

Test code,

public class Test {

public static void main(String[] args) {
try {
if (args != null) {
int foo = 0;
if (args.length == 1)
foo = 1;
else if (args.length == 3)
foo = 3;
System.out.println(foo);
}
} catch (RuntimeException n) {
throw n;
}
}
}

Performs fine with previous version of PhiNodeManager, issue is related to the blocks.


More information about the Soot-list mailing list