mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Fix for CommentSorter crash
This commit is contained in:
parent
bb27721a1f
commit
0df9575f1b
2 changed files with 5 additions and 0 deletions
|
@ -283,6 +283,8 @@ bool CommentSorter::findPosition(Subsort &subsort,Comment *comm,const Funcdata *
|
|||
if (opiter != fd->endOpAll()) { // If there is an op at or after the comment
|
||||
PcodeOp *op = (*opiter).second;
|
||||
BlockBasic *block = op->getParent();
|
||||
if (block == (BlockBasic *)0)
|
||||
throw LowlevelError("Dead op reaching CommentSorter");
|
||||
if (block->contains(comm->getAddr())) { // If the op's block contains the address
|
||||
// Associate comment with this op
|
||||
subsort.setBlock(block->getIndex(), (uint4)op->getSeqNum().getOrder());
|
||||
|
@ -295,6 +297,8 @@ bool CommentSorter::findPosition(Subsort &subsort,Comment *comm,const Funcdata *
|
|||
--opiter;
|
||||
PcodeOp *op = (*opiter).second;
|
||||
BlockBasic *block = op->getParent();
|
||||
if (block == (BlockBasic *)0)
|
||||
throw LowlevelError("Dead op reaching CommentSorter");
|
||||
if (block->contains(comm->getAddr())) { // If the op's block contains the address
|
||||
// Treat the comment as being in this block at the very end
|
||||
subsort.setBlock(block->getIndex(),0xffffffff);
|
||||
|
|
|
@ -145,6 +145,7 @@ void Funcdata::stopProcessing(void)
|
|||
|
||||
{
|
||||
flags |= processing_complete;
|
||||
obank.destroyDead(); // Free up anything in the dead list
|
||||
#ifdef CPUI_STATISTICS
|
||||
glb->stats->process(*this);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue