Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • opensrc/SMPStaticAnalyzer
1 result
Show changes
Commits on Source (2)
......@@ -24,6 +24,12 @@ public:
// Constructors
STARS_IDA_Interface_t() : CGCBinary(false) {};
// Destructor
~STARS_IDA_Interface_t() {
this->funcmap.clear();
this->segmap.clear();
}
// Segment accessors
virtual STARS_Segment_t *getseg(const STARS_ea_t &addr) {
......
......@@ -391,6 +391,36 @@ SMPFunction::~SMPFunction() {
// when we saved the exprs for SPARK Ada translation.
this->DestroyLoopExprs();
}
for (size_t i = 0; i < this->ShadowCFGBlocks.size(); ++i) {
if (nullptr != this->ShadowCFGBlocks[i])
delete this->ShadowCFGBlocks[i];
}
for (size_t i = 0; i < this->LoopInductionVars.size(); ++i) {
for (struct InductionVarFamily CurrFam : this->LoopInductionVars[i]) {
if (nullptr != CurrFam.BIVInitExpr)
delete CurrFam.BIVInitExpr;
if (nullptr != CurrFam.BIVLimitExpr)
delete CurrFam.BIVLimitExpr;
}
}
for (size_t i = 0; i < this->LoopMemAddrExprsFromCalleeLoops.size(); ++i) {
for (STARSExpression *CurrExpr : this->LoopMemAddrExprsFromCalleeLoops[i]) {
if (nullptr != CurrExpr)
delete CurrExpr;
}
}
for (size_t i = 0; i < this->LoopMemAddrExprsFromCallees.size(); ++i) {
for (STARSExpression *CurrExpr : this->LoopMemAddrExprsFromCallees[i]) {
if (nullptr != CurrExpr)
delete CurrExpr;
}
}
return;
} // end of SMPFunction::destructor
 
void SMPFunction::DestroyLoopExprs(void) {
......
......@@ -4931,7 +4931,7 @@ SMPInstr::~SMPInstr() {
this->Defs.clear();
this->Uses.clear();
}
#if 0 // fix crashes before enabling this
#if 1 // fix crashes before enabling this
if (nullptr != this->STARSInstPtr) {
delete this->STARSInstPtr;
this->STARSInstPtr = nullptr;