[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: this poorly optimised bytecode causes soot to crash



I have checked in the appended change to src/soot/coffi/CFG.java,
so that it should now handle dup_x2 correctly.  You can either
apply the patch to your source, or download a new copy of the
entire file from:

  http://svn.sable.mcgill.ca/viewcvs/soot/trunk/src/soot/coffi/CFG.java?rev=1098&content-type=text/vnd.viewcvs-markup



Index: src/soot/coffi/CFG.java
===================================================================
--- src/soot/coffi/CFG.java     (revision 1097)
+++ src/soot/coffi/CFG.java     (working copy)
@@ -3498,12 +3498,12 @@
                 l1 = Util.v().getLocalForStackOp(listBody, typeStack, typeStack.topIndex());

                 stmt = Jimple.v().newAssignStmt(Util.v().getLocalForStackOp(listBody, postTypeStack,
-                    postTypeStack.topIndex() - 3), l1);
+                    postTypeStack.topIndex() - 2), l3);

                 statements.add(stmt);

                 stmt = Jimple.v().newAssignStmt(Util.v().getLocalForStackOp(listBody, postTypeStack,
-                    postTypeStack.topIndex() - 2), l3);
+                    postTypeStack.topIndex() - 3), l1);

                 statements.add(stmt);