From bdc85357aa41a9610498232c2cffe7aa191e5cf6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 4 Jun 2024 17:27:13 -0300 Subject: 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. --- testes/db.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'testes') 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 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 -- cgit v1.2.3-55-g6feb