[Soot-list] Transform of call sites
Eric Bodden
bodden at st.informatik.tu-darmstadt.de
Mon Jul 26 11:15:21 EDT 2010
There seems to be a mistake...
> Iterator stmtIt = body.getUnits().snapshotIterator();
> while (stmtIt.hasNext()) {
> Stmt stmt = (Stmt) stmtIt.next();
> if (stmt.containsInvokeExpr()) {
> ValueBox invocation = stmt.getInvokeExprBox();
> InvokeExpr expr = (InvokeExpr) invocation.getValue();
> Local synthesized = newLocal(UUID.randomUUID().toString(), expr.getType(), body);
> Unit invocationUnit = Jimple.v().newAssignStmt(synthesized, expr);
> units.insertBefore(stmt, invocationUnit);
> invocation.setValue(synthesized);
Here you are exchanging the invoke expression by a local. That cannot
work if "stmt" is a simple InvokeStmt because then you "invoke" a
local vatiable, which makes no sense.
> }
> }
Eric
More information about the Soot-list
mailing list