2
0
Эх сурвалжийг харах

Fix LJ_MAX_JSLOTS assertion in rec_check_slots().

Thanks to Yichun Zhang.
Mike Pall 8 жил өмнө
parent
commit
1c89933f12
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      src/lj_record.c

+ 2 - 2
src/lj_record.c

@@ -81,9 +81,9 @@ static void rec_check_slots(jit_State *J)
   BCReg s, nslots = J->baseslot + J->maxslot;
   BCReg s, nslots = J->baseslot + J->maxslot;
   int32_t depth = 0;
   int32_t depth = 0;
   cTValue *base = J->L->base - J->baseslot;
   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(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++) {
   for (s = 0; s < nslots; s++) {
     TRef tr = J->slot[s];
     TRef tr = J->slot[s];
     if (tr) {
     if (tr) {