diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-06-04 17:27:13 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-06-04 17:27:13 -0300 |
commit | bdc85357aa41a9610498232c2cffe7aa191e5cf6 (patch) | |
tree | 49acbe61a8c1f4dfaa36892ad01eba7cf56a78f4 /testes | |
parent | b291008cc2a63eb19918d4cce7e58118f4154b03 (diff) | |
download | lua-bdc85357aa41a9610498232c2cffe7aa191e5cf6.tar.gz lua-bdc85357aa41a9610498232c2cffe7aa191e5cf6.tar.bz2 lua-bdc85357aa41a9610498232c2cffe7aa191e5cf6.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')
-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 |