Re: An heap-use-after-free is triggered in the insertkey()

Roberto Ierusalimschy <[email protected]> Fri, 10 Jul 2026 13:34:53 -0300
Newsgroups gmane.comp.lang.lua.general
Message-ID <[email protected]>
> I've finally got some time to debug that, and it is a real bug!
> 
> [...]

A distilled example:

  local parent = {}
  parent.__newindex = parent
  collectgarbage()
  local child = setmetatable({}, parent)
  child.__newindex = {x = "hello"}
  collectgarbage("step")
  print(parent.__newindex.x)

-- Roberto

-- 
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/20260710163453.GA90051%40arraial.inf.puc-rio.br.