mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 10:19:23 +02:00
Adjust likelytrash action to account for STORE based INDIRECTs
This commit is contained in:
parent
feb2e6887b
commit
29f207400d
1 changed files with 13 additions and 1 deletions
|
@ -1716,7 +1716,13 @@ uint4 ActionLikelyTrash::countMarks(PcodeOp *op)
|
|||
res += 1;
|
||||
break;
|
||||
}
|
||||
if (!vn->isWritten()||(vn->getDef()->code()!=CPUI_INDIRECT)) // Chain up through INDIRECTs
|
||||
if (!vn->isWritten()) break;
|
||||
PcodeOp *defOp = vn->getDef();
|
||||
if (defOp == op) { // We have looped all the way around
|
||||
res += 1;
|
||||
break;
|
||||
}
|
||||
else if (defOp->code() != CPUI_INDIRECT) // Chain up through INDIRECTs
|
||||
break;
|
||||
vn = vn->getDef()->getIn(0);
|
||||
}
|
||||
|
@ -1763,6 +1769,12 @@ bool ActionLikelyTrash::traceTrash(Varnode *vn,vector<PcodeOp *> &indlist)
|
|||
case CPUI_INDIRECT:
|
||||
if (outvn->isPersist())
|
||||
istrash = false;
|
||||
else if (op->isIndirectStore()) {
|
||||
if (!outvn->isMark()) {
|
||||
outvn->setMark();
|
||||
markedlist.push_back(outvn);
|
||||
}
|
||||
}
|
||||
else
|
||||
indlist.push_back(op);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue