Blob Blame History Raw
commit 31afda31814ec02f82ffb0519bee496c87eeaa89
Merge: 8271c64 1c89933
Author: Mike Pall <mike>
Date:   Tue May 9 21:01:23 2017 +0200

    Merge branch 'master' into v2.1

commit 1c89933f129dde76944336c6bfd05297b8d67730
Author: Mike Pall <mike>
Date:   Tue May 9 20:59:37 2017 +0200

    Fix LJ_MAX_JSLOTS assertion in rec_check_slots().
    
    Thanks to Yichun Zhang.

diff --git a/src/lj_record.c b/src/lj_record.c
index 9d0469c..c2d0274 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -87,9 +87,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+LJ_FR2 && J->baseslot < LJ_MAX_JSLOTS);
+  lua_assert(J->baseslot >= 1+LJ_FR2);
   lua_assert(J->baseslot == 1+LJ_FR2 || (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) {