Skip to content

Commit

Permalink
fixed ConcurrentModificationException
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenArzt committed Oct 14, 2024
1 parent 9fde961 commit 2d62400
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/java/soot/dexpler/DexBody.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -789,7 +790,7 @@ public Body jimplify(Body b, SootMethod m) {
UnconditionalBranchFolder.v().transform(jBody);
}
DexFillArrayDataTransformer.v().transform(jBody);
//SharedInitializationLocalSplitter destroys the inserted casts, so we have to reintroduce them
// SharedInitializationLocalSplitter destroys the inserted casts, so we have to reintroduce them
convertFloatsAndDoubles(b, jimple);

TypeAssigner.v().transform(jBody);
Expand Down Expand Up @@ -952,7 +953,6 @@ public Body jimplify(Body b, SootMethod m) {
DexReturnPacker.v().transform(jBody);

for (Unit u : jBody.getUnits()) {

if (u instanceof AssignStmt) {
AssignStmt ass = (AssignStmt) u;
if (ass.getRightOp() instanceof CastExpr) {
Expand Down Expand Up @@ -1092,14 +1092,16 @@ public void convertFloatsAndDoubles(Body b, final Jimple jimple) {

/**
* Removes all dexpler specific tags. Saves some memory.
* @param unit the statement
*
* @param unit
* the statement
*/
private void removeDexplerTags(Unit unit) {
for (Tag t : unit.getTags()) {
for (Iterator<Tag> it = unit.getTags().iterator(); it.hasNext();) {
Tag t = it.next();
if (t instanceof DexplerTag) {
unit.removeTag(t.getName());
it.remove();
}

}
}

Expand Down

0 comments on commit 2d62400

Please sign in to comment.