summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2017-05-09 20:59:37 +0200
committerMike Pall <mike>2017-05-09 20:59:37 +0200
commit1c89933f129dde76944336c6bfd05297b8d67730 (patch)
treea5a019e645f700486681bda89d0794ee7bc0820f
parent0bf80b07b0672ce874feedcc777afe1b791ccb5a (diff)
downloadluajit2-1c89933f129dde76944336c6bfd05297b8d67730.tar.gz
Fix LJ_MAX_JSLOTS assertion in rec_check_slots().
Thanks to Yichun Zhang.
-rw-r--r--src/lj_record.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index 7b572764..cecacd21 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) {