Continue analyzing functions after unknown jumps (#106)

* Continue analyzing functions after unknown jumps
This commit is contained in:
cadmic 2025-06-09 21:45:21 -07:00 committed by GitHub
parent d969819b78
commit 7bc0bc474d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -417,9 +417,13 @@ impl Tracker {
Ok(ExecCbResult::Continue) Ok(ExecCbResult::Continue)
} }
StepResult::Jump(target) => match target { StepResult::Jump(target) => match target {
BranchTarget::Return => Ok(ExecCbResult::EndBlock),
BranchTarget::Unknown BranchTarget::Unknown
| BranchTarget::Return
| BranchTarget::JumpTable { address: RelocationTarget::External, .. } => { | BranchTarget::JumpTable { address: RelocationTarget::External, .. } => {
let next_addr = ins_addr + 4;
if next_addr < function_end {
possible_missed_branches.insert(ins_addr + 4, vm.clone_all());
}
Ok(ExecCbResult::EndBlock) Ok(ExecCbResult::EndBlock)
} }
BranchTarget::Address(addr) => { BranchTarget::Address(addr) => {