bit expression, depending on the guest's word size.
Each temp is assigned only once, before its uses.
- */
+*/
+
+static inline Int countArgs ( IRExpr** args )
+{
+ Int i;
+ for (i = 0; args[i]; i++)
+ ;
+ return i;
+}
static
__attribute((noreturn))
sanityCheckFail(bb,stmt,"Iex.LDle.addr: not :: guest word type");
break;
case Iex_CCall:
+ if (!saneIRCallee(expr->Iex.CCall.cee))
+ sanityCheckFail(bb,stmt,"Iex.CCall.cee: bad IRCallee");
+ if (expr->Iex.CCall.cee->regparms > countArgs(expr->Iex.CCall.args))
+ sanityCheckFail(bb,stmt,"Iex.CCall.cee: #regparms > #args");
for (i = 0; expr->Iex.CCall.args[i]; i++)
tcExpr(bb,stmt, expr->Iex.CCall.args[i], gWordTy);
if (expr->Iex.CCall.retty == Ity_Bit)
d = stmt->Ist.Dirty.details;
if (d->cee == NULL) goto bad_dirty;
if (!saneIRCallee(d->cee)) goto bad_dirty;
+ if (d->cee->regparms > countArgs(d->args)) goto bad_dirty;
if (d->mFx == Ifx_None) {
if (d->mAddr != NULL || d->mSize != 0)
goto bad_dirty;