From 1c89933f129dde76944336c6bfd05297b8d67730 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 9 May 2017 20:59:37 +0200 Subject: [PATCH] Fix LJ_MAX_JSLOTS assertion in rec_check_slots(). Thanks to Yichun Zhang. --- src/lj_record.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lj_record.c b/src/lj_record.c index 7b57276489..cecacd218b 100644 --- a/src/lj_record.c +++ b/src/lj_record.c @@ -81,9 +81,9 @@ static void rec_check_slots(jit_State *J) BCReg s, nslots = J->baseslot + J->maxslot; int32_t depth = 0; cTValue *base = J->L->base - J->baseslot; - lua_assert(J->baseslot >= 1 && J->baseslot < LJ_MAX_JSLOTS); + lua_assert(J->baseslot >= 1); lua_assert(J->baseslot == 1 || (J->slot[J->baseslot-1] & TREF_FRAME)); - lua_assert(nslots < LJ_MAX_JSLOTS); + lua_assert(nslots <= LJ_MAX_JSLOTS); for (s = 0; s < nslots; s++) { TRef tr = J->slot[s]; if (tr) {