aboutsummaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-05-23 10:38:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-05-23 10:38:03 -0300
commit4a00f61276a9a38b0427fbae3dbbd86dfb5a0749 (patch)
tree16ed717a2f4b79bad0743c2a8888ba55e013a309 /luaconf.h
parent42d40581dd919fb134c07027ca1ce0844c670daf (diff)
downloadlua-4a00f61276a9a38b0427fbae3dbbd86dfb5a0749.tar.gz
lua-4a00f61276a9a38b0427fbae3dbbd86dfb5a0749.tar.bz2
lua-4a00f61276a9a38b0427fbae3dbbd86dfb5a0749.zip
'lua_checkstack' doesn't need to check stack overflow
'luaD_growstack' already checks that. This commit also fixes an internal bug in 'luaD_growstack': a large 'n' could cause an arithmetic overflow when computing 'needed'.
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/luaconf.h b/luaconf.h
index d42d14b7..fcc0018b 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -728,7 +728,7 @@
728** CHANGE it if you need a different limit. This limit is arbitrary; 728** CHANGE it if you need a different limit. This limit is arbitrary;
729** its only purpose is to stop Lua from consuming unlimited stack 729** its only purpose is to stop Lua from consuming unlimited stack
730** space (and to reserve some numbers for pseudo-indices). 730** space (and to reserve some numbers for pseudo-indices).
731** (It must fit into max(size_t)/32.) 731** (It must fit into max(size_t)/32 and max(int)/2.)
732*/ 732*/
733#if LUAI_IS32INT 733#if LUAI_IS32INT
734#define LUAI_MAXSTACK 1000000 734#define LUAI_MAXSTACK 1000000