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-06-04 17:27:13 -03:00
parent b291008cc2
commit bdc85357aa
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