Merge branch 'GP-3150_emteere_ARM_ReturnBranchWaffleLockupFix'

This commit is contained in:
ghidra1 2023-04-21 15:34:16 -04:00
commit 528c0a8b94
2 changed files with 10 additions and 1 deletions

View file

@ -95,6 +95,10 @@ public class ArmAnalyzer extends ConstantPropagationAnalyzer {
!instr.getFlowType().isTerminal()) {
// need to set the return override
instr.setFlowOverride(FlowOverride.RETURN);
// get rid of any references that might have been put on from
// bad flows
ReferenceManager refMgr = program.getReferenceManager();
refMgr.removeAllReferencesFrom(instr.getAddress());
}
}
// if LR is a constant and is set right after this, this is a call
@ -109,6 +113,10 @@ public class ArmAnalyzer extends ConstantPropagationAnalyzer {
if (hasDataReferenceTo(program, addr)) {
return false;
}
// if flow already over-ridden don't override again
if (instr.getFlowOverride() != FlowOverride.NONE) {
return false;
}
instr.setFlowOverride(FlowOverride.CALL);
// need to trigger disassembly below! if not already
doArmThumbDisassembly(program, instr, context, addr,