[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bug in <close> implementation in Lua 5.4.0-rc3 (attempt to close an unrelated variable)
- From: "Joseph C. Sible" <josephcsible@...>
- Date: Fri, 22 May 2020 16:37:00 -0400
On Fri, May 22, 2020 at 4:26 PM Andrew Gierth
<andrew@tao11.riddles.org.uk> wrote:
>
> >>>>> "Gé" == Gé Weijers <ge@weijers.org> writes:
>
> Gé> The following program generates this error message:
>
> Gé> lua: bug.lua:19: attempt to close non-closable variable 'database'
> Gé> stack traceback:
> Gé> bug.lua:19: in main chunk
> Gé> [C]: in ?
>
> Confirmed this on freebsd/amd64, with asserts on and with or without
> compiler optimizations.
>
> --
> Andrew.
I can confirm as well, and I also managed to minimize the reproducer some more:
local var1 <const> = nil
local var2 <const> = nil
do
local var3 <close> = setmetatable({}, {__close = function() end})
end
local var4 = true
Joseph C. Sible