|
35 | 35 | import org.apache.commons.cli.Option; |
36 | 36 | import org.apache.commons.cli.Options; |
37 | 37 | import org.apache.commons.cli.ParseException; |
| 38 | +import org.apache.commons.collections4.SetUtils; |
| 39 | +import org.apache.commons.collections4.SetUtils.SetView; |
38 | 40 | import org.apache.logging.log4j.LogManager; |
39 | 41 | import org.apache.logging.log4j.Logger; |
40 | 42 |
|
@@ -696,18 +698,22 @@ private static Set<Statement> getSoundlySolvedJumps(JumpSolver checker, LiSA lis |
696 | 698 | fixpoint = false; |
697 | 699 | EVMCFG cfg = checker.getComputedCFG(); |
698 | 700 | Set<Statement> jumpdestNodes = cfg.getAllJumpdest(); |
699 | | - for (Statement unsoundNode : checker.getUnsoundJumps()) |
| 701 | + Set<Statement> unsoundJumps = checker.getUnsoundJumps(); |
| 702 | + Set<Statement> maybeUnsoundJumps = checker.getMaybeUnsoundJumps(); |
| 703 | + Set<Statement> unsound = unsoundJumps == null ? Collections.emptySet() : unsoundJumps; |
| 704 | + unsound = maybeUnsoundJumps == null ? unsound : SetUtils.union(unsound, maybeUnsoundJumps); |
| 705 | + for (Statement unsoundNode : unsound) |
700 | 706 | if (!soundlySolved.contains(unsoundNode)) { |
701 | 707 | fixpoint = true; |
702 | 708 | for (Statement jumpdest : jumpdestNodes) |
703 | 709 | cfg.addEdge(new SequentialEdge(unsoundNode, jumpdest)); |
704 | 710 | } |
705 | 711 |
|
706 | | - soundlySolved.addAll(checker.getUnsoundJumps()); |
| 712 | + soundlySolved.addAll(unsound); |
707 | 713 |
|
708 | 714 | program.addCodeMember(cfg); |
709 | 715 | lisa.run(program); |
710 | | - } while (fixpoint && checker.getUnsoundJumps() != null && ++currentIteration < MAX_ITER); |
| 716 | + } while (fixpoint && ++currentIteration < MAX_ITER); |
711 | 717 | } |
712 | 718 | return soundlySolved; |
713 | 719 | } |
|
0 commit comments