Skip to content

Commit 7bc0bc4

Browse files
authored
Continue analyzing functions after unknown jumps (#106)
* Continue analyzing functions after unknown jumps
1 parent d969819 commit 7bc0bc4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/analysis/tracker.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,13 @@ impl Tracker {
417417
Ok(ExecCbResult::Continue)
418418
}
419419
StepResult::Jump(target) => match target {
420+
BranchTarget::Return => Ok(ExecCbResult::EndBlock),
420421
BranchTarget::Unknown
421-
| BranchTarget::Return
422422
| BranchTarget::JumpTable { address: RelocationTarget::External, .. } => {
423+
let next_addr = ins_addr + 4;
424+
if next_addr < function_end {
425+
possible_missed_branches.insert(ins_addr + 4, vm.clone_all());
426+
}
423427
Ok(ExecCbResult::EndBlock)
424428
}
425429
BranchTarget::Address(addr) => {

0 commit comments

Comments
 (0)