diff options
author | Mike Pall <mike> | 2017-05-17 17:37:35 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2017-05-17 17:37:35 +0200 |
commit | 630ff3196a06353c6a7ccd1e9ac3958f4a8ca13c (patch) | |
tree | d0707175c3fa1c951066acb168963cdd47c449ec | |
parent | 1c89933f129dde76944336c6bfd05297b8d67730 (diff) | |
download | luajit-630ff3196a06353c6a7ccd1e9ac3958f4a8ca13c.tar.gz luajit-630ff3196a06353c6a7ccd1e9ac3958f4a8ca13c.tar.bz2 luajit-630ff3196a06353c6a7ccd1e9ac3958f4a8ca13c.zip |
Add missing LJ_MAX_JSLOTS check.
Thanks to Yichun Zhang.
-rw-r--r-- | src/lj_record.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index cecacd21..bc4e8a6d 100644 --- 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) | |||
633 | J->framedepth++; | 633 | J->framedepth++; |
634 | J->base += func+1; | 634 | J->base += func+1; |
635 | J->baseslot += func+1; | 635 | J->baseslot += func+1; |
636 | if (J->baseslot + J->maxslot >= LJ_MAX_JSLOTS) | ||
637 | lj_trace_err(J, LJ_TRERR_STACKOV); | ||
636 | } | 638 | } |
637 | 639 | ||
638 | /* Record tail call. */ | 640 | /* Record tail call. */ |