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 /testes/coroutine.lua | |
| 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 'testes/coroutine.lua')
| -rw-r--r-- | testes/coroutine.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testes/coroutine.lua b/testes/coroutine.lua index 5674a4dd..ca30011f 100644 --- a/testes/coroutine.lua +++ b/testes/coroutine.lua | |||
| @@ -107,7 +107,7 @@ function filter (p, g) | |||
| 107 | end) | 107 | end) |
| 108 | end | 108 | end |
| 109 | 109 | ||
| 110 | local x = gen(100) | 110 | local x = gen(80) |
| 111 | local a = {} | 111 | local a = {} |
| 112 | while 1 do | 112 | while 1 do |
| 113 | local n = x() | 113 | local n = x() |
| @@ -116,7 +116,7 @@ while 1 do | |||
| 116 | x = filter(n, x) | 116 | x = filter(n, x) |
| 117 | end | 117 | end |
| 118 | 118 | ||
| 119 | assert(#a == 25 and a[#a] == 97) | 119 | assert(#a == 22 and a[#a] == 79) |
| 120 | x, a = nil | 120 | x, a = nil |
| 121 | 121 | ||
| 122 | 122 | ||
