lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Jul 24, 2023, 19:47 Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> After a stack overflow in a coroutine, the GC appears not to clean up
> its stack. This seems to happen at least in Lua 5.1.5 and one built
> from Git commit ea39042e13645f63713425c05cc9ee4cfdcf0a40 (5.4.6+)
> (Debian amd64).

This is expected behavior. After an error in a coroutine, you can still
inspect its stack (e.g., to make a trace), so the stack cannot be
cleared.

Thanks for the clarification. So, were it not for the debug library, the stack could be cleared?

Once the coroutine itself becomes garbage, then its stack
can be collected:

That's right and known to me. At the moment I'm facing a peculiar memory dump with several threads in a strange stack state and trying to reproduce or understand the issue, hence this email...

Best regards,

-- 
DoubleF