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.
This commit is contained in:
Roberto Ierusalimschy
2024-05-13 13:10:35 -03:00
parent de794a6527
commit dfbde4c7d5
3 changed files with 34 additions and 23 deletions

View File

@@ -49,6 +49,15 @@ do
end
-- bug in 5.4.4-5.4.6: activelines in vararg functions
-- without debug information
do
local func = load(string.dump(load("print(10)"), true))
local actl = debug.getinfo(func, "L").activelines
assert(#actl == 0) -- no line info
end
-- test file and string names truncation
local a = "function f () end"
local function dostring (s, x) return load(s, x)() end