[Soot-list] bug in commit c76b62205 (partially allows dalvik to Jimple creation)

Phil Pratt-Szeliga pcpratts at trifort.org
Thu Jan 31 17:31:30 EST 2013


Hello,

The additions to UseChecker.java in commit [1] cause an array cast
exception in a test case I have. It makes code that tries to cast a
byte array to an int array.

If someone has time, can you explain this change:

diff --git a/src/soot/jimple/toolkits/typing/fast/UseChecker.java
b/src/soot/jimple/toolkits/typing/fast/UseChecker.java
index fdc1913..5aa6c65 100644
--- a/src/soot/jimple/toolkits/typing/fast/UseChecker.java
+++ b/src/soot/jimple/toolkits/typing/fast/UseChecker.java
@@ -184,6 +184,9 @@ public class UseChecker extends AbstractStmtSwitch
  else if ( rhs instanceof ArrayRef )
  {
  this.handleArrayRef((ArrayRef)rhs, stmt);
+ if (!(tlhs instanceof BottomType || tlhs instanceof BottomType)) {
+ ((ArrayRef)rhs).setBase((Local)this.uv.visit(((ArrayRef)rhs).getBase(),
tlhs.makeArrayType(), stmt));
+ }
  stmt.setRightOp(this.uv.visit(rhs, tlhs, stmt));
  }
  else if ( rhs instanceof InstanceFieldRef )

Thanks,
Phil Pratt-Szeliga
Syracuse University
http://trifort.org/

[1] c76b6220575c0c8a286a6807082895bba9c7a65b


More information about the Soot-list mailing list