mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
fixed nested iteration bug
This commit is contained in:
parent
dadcb20918
commit
b127e3c91b
1 changed files with 14 additions and 11 deletions
|
@ -2341,6 +2341,7 @@ void ValueSetSolver::solve(int4 max)
|
||||||
componentStack.push_back(curSet->partHead);
|
componentStack.push_back(curSet->partHead);
|
||||||
curComponent = curSet->partHead;
|
curComponent = curSet->partHead;
|
||||||
curComponent->isDirty = false;
|
curComponent->isDirty = false;
|
||||||
|
curComponent->startNode->looped(); // Reset component counter upon entry
|
||||||
}
|
}
|
||||||
if (curComponent != (Partition *)0) {
|
if (curComponent != (Partition *)0) {
|
||||||
if (curSet->iterate())
|
if (curSet->iterate())
|
||||||
|
@ -2349,7 +2350,7 @@ void ValueSetSolver::solve(int4 max)
|
||||||
curSet = curSet->next;
|
curSet = curSet->next;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
do {
|
for(;;) {
|
||||||
if (curComponent->isDirty) {
|
if (curComponent->isDirty) {
|
||||||
curComponent->isDirty = false;
|
curComponent->isDirty = false;
|
||||||
curSet = curComponent->startNode;
|
curSet = curComponent->startNode;
|
||||||
|
@ -2358,7 +2359,7 @@ void ValueSetSolver::solve(int4 max)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
componentStack.pop_back();
|
componentStack.pop_back();
|
||||||
if (componentStack.empty()) {
|
if (componentStack.empty()) {
|
||||||
curComponent = (Partition *)0;
|
curComponent = (Partition *)0;
|
||||||
|
@ -2366,9 +2367,11 @@ void ValueSetSolver::solve(int4 max)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
curComponent = componentStack.back();
|
curComponent = componentStack.back();
|
||||||
curComponent->startNode->looped();
|
if (curComponent->stopNode != curSet) {
|
||||||
|
curSet = curSet->next;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} while(curComponent->stopNode == curSet);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue