Skip to content

Commit 61a8aad

Browse files
authored
Merge pull request #480 from secure-software-engineering/f-ReintroduceFixIteratorInvalidationDuringPropagate
Reintroduces iterator invalidation fix from #442
2 parents d7df6fe + 9ab8c38 commit 61a8aad

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver

include/phasar/PhasarLLVM/DataFlowSolver/IfdsIde/Solver/IDESolver.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,8 @@ class IDESolver
719719
if (!LookupResults) {
720720
continue;
721721
}
722-
for (const auto &Entry : LookupResults->get()) {
722+
for (size_t I = 0; I < LookupResults->get().size(); ++I) {
723+
auto Entry = LookupResults->get()[I];
723724
d_t dPrime = Entry.first;
724725
EdgeFunctionPtrType fPrime = Entry.second;
725726
n_t SP = Stmt;
@@ -1098,9 +1099,8 @@ class IDESolver
10981099
// return site using the composed function
10991100
auto RevLookupResult = JumpFn->reverseLookup(c, d4);
11001101
if (RevLookupResult) {
1101-
llvm::SmallVector<std::pair<d_t, EdgeFunctionPtrType>, 2> ResCopy(
1102-
RevLookupResult->get().begin(), RevLookupResult->get().end());
1103-
for (const auto &ValAndFunc : ResCopy) {
1102+
for (size_t I = 0; I < RevLookupResult->get().size(); ++I) {
1103+
auto ValAndFunc = RevLookupResult->get()[I];
11041104
EdgeFunctionPtrType f3 = ValAndFunc.second;
11051105
if (!f3->equal_to(AllTop)) {
11061106
d_t d3 = ValAndFunc.first;

0 commit comments

Comments
 (0)