瀏覽代碼

Fix stack check when recording BC_VARG.

Contributed by Yichun Zhang.
Mike Pall 5 年之前
父節點
當前提交
e0388e6c00
共有 1 個文件被更改,包括 2 次插入0 次删除
  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 -------------------------------------------------- */