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)
Subproject commit 2b640f5e65afd7c41df59ef6416fae46f46a929e
Subproject commit ddb106c4c1e521bf4b282d17e2a8abf0aa0fe721
......@@ -2062,7 +2062,7 @@ bool SMPFunction::AnalyzeStackPointerDeltas(void) {
#if SMP_COMPARE_IDA_STARS_STACK_POINTER_DELTAS
DebugFlag = (0 == strcmp("_dl_profile_fixup", this->GetFuncName()));
TraceFlag = (0 == strcmp("_dl_profile_fixup", this->GetFuncName()));
bool DebugFuncFound = (0x8089910 == this->GetFirstFuncAddr());
bool DebugFuncFound = (0x43ac70 == this->GetFirstFuncAddr());
DebugFlag = DebugFlag || DebugFuncFound;
TraceFlag = TraceFlag || DebugFuncFound;
#endif
......@@ -2500,6 +2500,8 @@ bool SMPFunction::AnalyzeStackPointerDeltas(void) {
else { // First RETURN statement seen.
ReturnSeen = true;
this->NetStackDelta = IncomingDelta;
SMP_msg("INFO: First stack delta seen at return instruction at %p : Current: %lld\n",
CurrInst->GetAddr(), (long long) IncomingDelta);
#if SMP_AUDIT_STACK_POINTER_DELTAS
if (CALLING_CONVENTION_DEFAULT_FUNCTION_STACK_DELTA != IncomingDelta) {
SMP_msg("WARNING: Stack delta not %d after return instruction at %llx\n",
......@@ -2529,7 +2531,7 @@ bool SMPFunction::AnalyzeStackPointerDeltas(void) {
CurrBlock->SetOutgoingStackDelta(IncomingDelta); // record incoming delta for all successors
if (ReachesOutChanged || (!ReprocessingAllocaBlocks)) { // if anything changed (deltas or reaching defs ReachOut set)
list<SMPBasicBlock *>::iterator SuccIter;
if (DebugFlag && (0 == IncomingDelta)) {
if (DebugFlag && (0 == IncomingDelta) && (0 < this->GetLocalVarsSize())) {
SMP_msg("ERROR: Pushing WorkList items with IncomingDelta of zero. Dumping Block:\n");
CurrBlock->Dump();
}
......
......@@ -856,7 +856,7 @@ void SMPProgram::Analyze(ProfilerInformation *pi, FILE *AnnotFile, FILE *InfoAnn
}
#if 1
// bool FuncFound = (0 == strcmp("__mktime_internal", CurrFunc->GetFuncName()));
bool FuncFound = (0x8089910 == CurrFunc->GetFirstFuncAddr());
bool FuncFound = (0x43ac70 == CurrFunc->GetFirstFuncAddr());
if ((!changed || (IterationCounter > STARS_INTERPROCEDURAL_ITERATION_LIMIT)) && FuncFound) {
CurrFunc->Dump();
CurrFunc->DumpDotCFG();
......
......@@ -500,9 +500,13 @@ void STARS_IDA_Function_t::BuildFuncIR(SMPFunction *func)
// Found a caller, with its call address in CurrXrefs.from
func->AddCallSource(FromAddr);
}
else if (DEFAULT == CallType) {
SMP_msg("ERROR: Fallthrough from %llx to func at %llx with xref type %d\n",
(uint64_t) FromAddr, (uint64_t) addr, CurrXrefs.GetType());
}
else {
SMP_msg("ERROR: Bad CallInst.Analyze() at %llx to %llx with xref type %d\n",
(unsigned long long) FromAddr, (unsigned long long) addr, CurrXrefs.GetType());
(uint64_t) FromAddr, (uint64_t) addr, CurrXrefs.GetType());
}
}
else { // Data xref
......