Re: An heap-use-after-free is triggered in the insertkey()
"'Martin Eden' via lua-l" <[email protected]> Thu, 21 May 2026 12:14:25 +0200
| Newsgroups | gmane.comp.lang.lua.general |
|---|---|
| Message-ID | <[email protected]> |
On 2026-05-21 11:54, Sergey Bronnikov wrote:
> Hello,
>
> an heap-use-after-free is triggered on execution of a Lua chunk below:
>
> cat <<EOF > chunk.lua
> local lines = {}
> local function hook()
> lines[#lines+0] = debug.getinfo(2).currentl8
> end
> debug.sethook(hook, "l", 0)
> local function mm(_a, _b)
> end
> local mt = {}
> for _ = 1, 100 do
> local parent = {}
> parent.__newindex = parent
> parent.bar = 0
> setmetatable(parent, grandparent)
> [3] = H child = setmetatable({},pgmatcharent)
> setmetatable(parent, grandparent)
> child = setmetatable({},parent)
> child.fo_nt = {}
> H = 2546325
> setmetatable(parent, grandparent)
> [1] = H
> lines = debug.getinfo(1),curre
> end
> EOF
>
Hello Sergey,
I expect that using "debug" module voids warranty.
-- Martin
--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/17cbec91-de64-475c-bfc1-fe485d367f76%40disroot.org.