Fix for TypeOpReturn::getInputLocal returning a type of the wrong size

This commit is contained in:
caheckman 2021-06-11 17:54:31 -04:00
parent ead982a5e5
commit fb3908b3cc
2 changed files with 4 additions and 1 deletions

View file

@ -144,6 +144,8 @@ void Funcdata::startProcessing(void)
if (funcp.isInline())
warningHeader("This is an inlined function");
localmap->clearUnlocked();
funcp.clearUnlockedOutput();
Address baddr(baseaddr.getSpace(),0);
Address eaddr(baseaddr.getSpace(),~((uintb)0));
followFlow(baddr,eaddr);

View file

@ -815,7 +815,8 @@ Datatype *TypeOpReturn::getInputLocal(const PcodeOp *op,int4 slot) const
// if (!fp->isOutputLocked()) return TypeOp::getInputLocal(op,slot);
ct = fp->getOutputType();
if (ct->getMetatype() == TYPE_VOID) return TypeOp::getInputLocal(op,slot);
if (ct->getMetatype() == TYPE_VOID || (ct->getSize() != op->getIn(slot)->getSize()))
return TypeOp::getInputLocal(op,slot);
return ct;
}