Merge remote-tracking branch

'origin/GP-1554_emteere_InfiniteLoopStackAnalysis--SQUASHED' into
Ghidra_10.1 (Closes #3683)
This commit is contained in:
ghidra1 2021-11-30 19:21:14 -05:00
commit 2c8bb0ff8d

View file

@ -778,6 +778,9 @@ public class SymbolicPropogator {
Msg.info(this, minInstrAddress + " " + instruction);
}
// callfixup injection targets that have already been used
HashSet<Address> previousInjectionTarget = new HashSet<>();
int mustClearAllUntil_PcodeIndex = -1;
// flag won't get set until there is something to clear
boolean mustClearAll = false;
@ -941,12 +944,17 @@ public class SymbolicPropogator {
}
}
// check for pcode replacement - callfixup
PcodeOp[] injectionPcode = checkForCallFixup(prog, func, instruction);
if (injectionPcode != null && injectionPcode.length > 0) {
ops = injectPcode(ops, pcodeIndex, injectionPcode);
pcodeIndex = -1;
injected = true;
continue;
// don't re-inject to the same site.
if (!previousInjectionTarget.contains(target)) {
PcodeOp[] injectionPcode =
checkForCallFixup(prog, func, instruction);
if (injectionPcode != null && injectionPcode.length > 0) {
previousInjectionTarget.add(target);
ops = injectPcode(ops, pcodeIndex, injectionPcode);
pcodeIndex = -1;
injected = true;
continue;
}
}
}