diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-27 14:32:29 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-27 14:32:29 -0200 |
commit | ba7da13ec5938f978c37d63aa40a3e340b301f79 (patch) | |
tree | c1f22403954f6e0c6d17c8495c11509103313c9a /luaconf.h | |
parent | da37ac9c7894186a0e2e0e6f1f5f00b825fd1555 (diff) | |
download | lua-ba7da13ec5938f978c37d63aa40a3e340b301f79.tar.gz lua-ba7da13ec5938f978c37d63aa40a3e340b301f79.tar.bz2 lua-ba7da13ec5938f978c37d63aa40a3e340b301f79.zip |
Changes in the control of C-stack overflow
* unification of the 'nny' and 'nCcalls' counters;
* external C functions ('lua_CFunction') count more "slots" in
the C stack (to allow for their possible use of buffers)
* added a new test script specific for C-stack overflows. (Most
of those tests were already present, but concentrating them
in a single script easies the task of checking whether
'LUAI_MAXCCALLS' is adequate in a system.)
Diffstat (limited to 'luaconf.h')
-rw-r--r-- | luaconf.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -695,14 +695,14 @@ | |||
695 | /* | 695 | /* |
696 | @@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. | 696 | @@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. |
697 | ** CHANGE it if it uses too much C-stack space. (For long double, | 697 | ** CHANGE it if it uses too much C-stack space. (For long double, |
698 | ** 'string.format("%.99f", -1e4932)' needs 5034 bytes, so a | 698 | ** 'string.format("%.99f", -1e4932)' needs 5052 bytes, so a |
699 | ** smaller buffer would force a memory allocation for each call to | 699 | ** smaller buffer would force a memory allocation for each call to |
700 | ** 'string.format'.) | 700 | ** 'string.format'.) |
701 | */ | 701 | */ |
702 | #if LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE | 702 | #if LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE |
703 | #define LUAL_BUFFERSIZE 8192 | 703 | #define LUAL_BUFFERSIZE 8192 |
704 | #else | 704 | #else |
705 | #define LUAL_BUFFERSIZE ((int)(0x80 * sizeof(void*) * sizeof(lua_Integer))) | 705 | #define LUAL_BUFFERSIZE ((int)(16 * sizeof(void*) * sizeof(lua_Number))) |
706 | #endif | 706 | #endif |
707 | 707 | ||
708 | /* | 708 | /* |