mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-26 01:55:52 +08:00
Merge branch 'GP-3150_emteere_ARM_ReturnBranchWaffleLockupFix'
This commit is contained in:
+2
-1
@@ -425,7 +425,8 @@ public class ConstantPropagationAnalyzer extends AbstractAnalyzer {
|
||||
final Function func = program.getFunctionManager().getFunctionContaining(start);
|
||||
if (func != null) {
|
||||
AddressSetView body = func.getBody();
|
||||
if (set != null && body.getNumAddresses() > set.getNumAddresses()) {
|
||||
// don't override flow set if only one address
|
||||
if (body.getNumAddresses() > 1) {
|
||||
flowSet = body;
|
||||
}
|
||||
flowStart = func.getEntryPoint();
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user