diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-02-26 11:31:10 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-02-26 11:31:10 -0300 |
| commit | f9e35627ed26dff4114a1d01ff113d8b4cc91ab5 (patch) | |
| tree | ad817f574adcd2d57720c8a498626919b85e6e78 /ltests.h | |
| parent | ceac82f78be8baeddfa8536472d8b08df2eb7d49 (diff) | |
| download | lua-f9e35627ed26dff4114a1d01ff113d8b4cc91ab5.tar.gz lua-f9e35627ed26dff4114a1d01ff113d8b4cc91ab5.tar.bz2 lua-f9e35627ed26dff4114a1d01ff113d8b4cc91ab5.zip | |
'lua_State.nci' must be an integer
Lua can easily overflow an unsigned short counting nested calls.
(The limit to this value is the maximum stack size, LUAI_MAXSTACK,
which is currently 1e6.)
Diffstat (limited to 'ltests.h')
| -rw-r--r-- | ltests.h | 7 |
1 files changed, 5 insertions, 2 deletions
| @@ -152,9 +152,12 @@ LUA_API void *debug_realloc (void *ud, void *block, | |||
| 152 | */ | 152 | */ |
| 153 | 153 | ||
| 154 | 154 | ||
| 155 | /* make stack-overflow tests run faster */ | 155 | /* |
| 156 | ** Reduce maximum stack size to make stack-overflow tests run faster. | ||
| 157 | ** (But value is still large enough to overflow smaller integers.) | ||
| 158 | */ | ||
| 156 | #undef LUAI_MAXSTACK | 159 | #undef LUAI_MAXSTACK |
| 157 | #define LUAI_MAXSTACK 50000 | 160 | #define LUAI_MAXSTACK 68000 |
| 158 | 161 | ||
| 159 | 162 | ||
| 160 | /* test mode uses more stack space */ | 163 | /* test mode uses more stack space */ |
