Public Git Hosting - luajit-2.0.git/blobdiff (original) (raw)
diff --git a/src/lj_record.c b/src/lj_record.c
index cecacd2..bc4e8a6 100644 (file)
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -633,6 +633,8 @@ void lj_record_call(jit_State *J, BCReg func, ptrdiff_t nargs)
J->framedepth++;
J->base += func+1;
J->baseslot += func+1;
+ if (J->baseslot + J->maxslot >= LJ_MAX_JSLOTS)
+ lj_trace_err(J, LJ_TRERR_STACKOV);
}
/* Record tail call. */