Sfoglia il codice sorgente

Fix stack check when recording BC_VARG.

Contributed by Yichun Zhang.
Mike Pall 5 anni fa
parent
commit
e0388e6c00
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      src/lj_record.c

+ 2 - 0
src/lj_record.c

@@ -1602,6 +1602,8 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
       lj_trace_err_info(J, LJ_TRERR_NYIBC);
     }
   }
+  if (J->baseslot + J->maxslot >= LJ_MAX_JSLOTS)
+    lj_trace_err(J, LJ_TRERR_STACKOV);
 }
 
 /* -- Record allocations -------------------------------------------------- */