Skip to content

Commit

Permalink
fix: avoid ConcurrentModificationException in EliminatePhiNodes pass
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Feb 21, 2019
1 parent 0fa19fb commit e1ca290
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package jadx.core.dex.visitors.ssa;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

Expand Down Expand Up @@ -111,7 +112,7 @@ private void replaceMerge(MethodNode mth, BlockNode block, InsnNode insn) {
if (assignParentInsn != null) {
assignParentInsn.setResult(newAssignArg);
}
for (RegisterArg useArg : oldSVar.getUseList()) {
for (RegisterArg useArg : new ArrayList<>(oldSVar.getUseList())) {
RegisterArg newUseArg = useArg.duplicate(newRegNum, newSVar);
InsnNode parentInsn = useArg.getParentInsn();
if (parentInsn != null) {
Expand Down

0 comments on commit e1ca290

Please sign in to comment.