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)
......@@ -585,9 +585,15 @@ void SMPBasicBlock::Dump(const bool SkeletonDump) {
SMP_msg("LiveOut set: ");
for (STARSOpndTypePtr LiveOutOp : this->LiveOutSet) {
map<STARSOpndTypePtr, int, LessOp>::const_iterator SSAIter = this->FindLiveOutSSAMap(LiveOutOp);
assert(SSAIter != this->GetLastLiveOutSSAMap());
int SSANum = SSAIter->second;
PrintListOperand(LiveOutOp, SSANum);
if (SSAIter != this->GetLastLiveOutSSAMap()) {
int SSANum = SSAIter->second;
PrintListOperand(LiveOutOp, SSANum);
}
else {
int SSANum = -1;
SMP_msg("SSA ERROR ");
PrintListOperand(LiveOutOp, SSANum);
}
}
}
SMP_msg("\n\n");
......
......@@ -3850,6 +3850,15 @@ void SMPFunction::BuildStackAccessTables(void) {
return;
}
}
if ((offset + DataSize - 1) >= this->NegativeOffsetStackFrameMap.size()) {
// We are about to fail an assertion. Emit some useful debugging info.
SMP_msg("FATAL ERROR: Stack access: (offset+DataSize-1) out of range: offset %llu DataSize %zu NegativeOffsetStackFrameMap size %zu InstAddr %llx ",
(uint64_t)offset, DataSize, this->NegativeOffsetStackFrameMap.size(), (uint64_t)InstAddr);
this->DumpFuncNameAndAddr();
CurrInst->Dump();
this->DumpDotCFG();
this->Dump(false);
}
assert((offset + DataSize - 1) < this->NegativeOffsetStackFrameMap.size());
for (int j = 0; j < (int) DataSize; ++j) {
this->NegativeOffsetStackFrameMap[offset + j].Read = true;