Fix initial maxslot for down-recursive traces.

This commit is contained in:
Mike Pall 2014-01-20 16:49:13 +01:00
parent 3db3cc10ff
commit dd910f0e01

View File

@ -2131,7 +2131,7 @@ static const BCIns *rec_setup_root(jit_State *J)
case BC_RET0:
case BC_RET1:
/* No bytecode range check for down-recursive root traces. */
J->maxslot = ra + bc_d(ins);
J->maxslot = ra + bc_d(ins) - 1;
break;
case BC_FUNCF:
/* No bytecode range check for root traces started by a hot call. */