diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-05-23 10:38:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-05-23 10:38:03 -0300 |
commit | 4a00f61276a9a38b0427fbae3dbbd86dfb5a0749 (patch) | |
tree | 16ed717a2f4b79bad0743c2a8888ba55e013a309 /luaconf.h | |
parent | 42d40581dd919fb134c07027ca1ce0844c670daf (diff) | |
download | lua-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |