diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-02-15 10:38:09 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-02-15 10:38:09 -0300 |
commit | 38cc7d40a4bcb89314d212fdffd2ca8deebc3cb7 (patch) | |
tree | e641ef35321e0b81cdd1ab577aeaaa1b40858437 /testes | |
parent | bc970005ce2e258e29a5c315ea4e49f76a66586e (diff) | |
download | lua-38cc7d40a4bcb89314d212fdffd2ca8deebc3cb7.tar.gz lua-38cc7d40a4bcb89314d212fdffd2ca8deebc3cb7.tar.bz2 lua-38cc7d40a4bcb89314d212fdffd2ca8deebc3cb7.zip |
Bug: cannot allow the call 'debug.getinfo(0, ">")'
A 'what' argument starting with '>' indicates that there is a function
in the C stack, which won't be there if the first argument is not a
function.
Diffstat (limited to 'testes')
-rw-r--r-- | testes/db.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testes/db.lua b/testes/db.lua index ce559ad9..d64952d9 100644 --- a/testes/db.lua +++ b/testes/db.lua | |||
@@ -31,6 +31,7 @@ end | |||
31 | 31 | ||
32 | do | 32 | do |
33 | assert(not pcall(debug.getinfo, print, "X")) -- invalid option | 33 | assert(not pcall(debug.getinfo, print, "X")) -- invalid option |
34 | assert(not pcall(debug.getinfo, 0, ">")) -- invalid option | ||
34 | assert(not debug.getinfo(1000)) -- out of range level | 35 | assert(not debug.getinfo(1000)) -- out of range level |
35 | assert(not debug.getinfo(-1)) -- out of range level | 36 | assert(not debug.getinfo(-1)) -- out of range level |
36 | local a = debug.getinfo(print) | 37 | local a = debug.getinfo(print) |