Replies: 2 comments
|
The lock is on the Symbol, not on the data-type, and
void Symbol::checkSizeTypeLock(void)
{
dispflags &= ~((uint4)size_typelock);
if (isTypeLocked() && (type->getMetatype() == TYPE_UNKNOWN))
dispflags |= size_typelock;
}
The function you instrumented is the one that does not ask, vn->setSymbolEntry(entry);
if (!sym->isTypeLocked()) {
localmap->retypeSymbol(sym,vn->getType());
}
else if (sym->getType() != vn->getType()) {
ostringstream s;
s << "Unable to use type for symbol " << sym->getName();
warningHeader(s.str());
localmap->retypeSymbol(sym,vn->getType());
}A symbol locked to Now the useful part, where a typelocked boolean istypelock = true;
if (Undefined.isUndefined(dt)) {
istypelock = false;
}so the lock arrived from one of these instead:
For a hash-storage local specifically, Commit Local Names is worth running, it calls To pin it down rather than guess, dump what the GUI actually sends: Debug Function Decompilation in the decompiler window ( Which is arguably worth an upstream issue: guarding Read off master today (application.version 12.2). Source only, I did not build the decompiler. |
|
Three corrections to my post above, one of which matters because it would have made things worse. First, the patch I suggested is wrong. if (!sym->isTypeLocked() || sym->isSizeTypeLocked()) {Second, line numbers. I read master, which is 12.2-DEV, and those offsets do not resolve in a released build. On Third, and most useful to you: that function only ever sees dynamic locals. One more thing worth knowing before you keep instrumenting. There is an early return above your code, if (vn->getSymbolEntry() != (SymbolEntry *)0) return false; // Symbol already appliedThe early pass, |
Uh oh!
There was an error while loading. Please reload this page.
How can a variable that is of datatype
undefined4fail to change type and complain that it istypelocked?I added some
WARNINGoutput to the decompiler code inFuncdata::attemptDynamicMmppingLate(...)(funcdata_varnode.cc), but I don't know where to go from there! Any ideas???All reactions