diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-05-13 13:10:35 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-05-13 13:10:35 -0300 |
| commit | dfbde4c7d540f81f2cc539741a2c1f4c00f91c10 (patch) | |
| tree | afb17d64bd9d7b5e61f94f373561c2fa98d5e713 /testes/db.lua | |
| parent | de794a6527058e75b674118b35f39dcbb13e88b1 (diff) | |
| download | lua-dfbde4c7d540f81f2cc539741a2c1f4c00f91c10.tar.gz lua-dfbde4c7d540f81f2cc539741a2c1f4c00f91c10.tar.bz2 lua-dfbde4c7d540f81f2cc539741a2c1f4c00f91c10.zip | |
Bug: Active-lines for stripped vararg functions
Lua seg. faults when asked to create the 'activelines' table for a
vararg function with no debug information.
Diffstat (limited to 'testes/db.lua')
| -rw-r--r-- | testes/db.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testes/db.lua b/testes/db.lua index d3758c41..49ff8e3e 100644 --- a/testes/db.lua +++ b/testes/db.lua | |||
| @@ -49,6 +49,15 @@ do | |||
| 49 | end | 49 | end |
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | -- bug in 5.4.4-5.4.6: activelines in vararg functions | ||
| 53 | -- without debug information | ||
| 54 | do | ||
| 55 | local func = load(string.dump(load("print(10)"), true)) | ||
| 56 | local actl = debug.getinfo(func, "L").activelines | ||
| 57 | assert(#actl == 0) -- no line info | ||
| 58 | end | ||
| 59 | |||
| 60 | |||
| 52 | -- test file and string names truncation | 61 | -- test file and string names truncation |
| 53 | local a = "function f () end" | 62 | local a = "function f () end" |
| 54 | local function dostring (s, x) return load(s, x)() end | 63 | local function dostring (s, x) return load(s, x)() end |
