lua-users home
lua-l archive

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


> Roberto Ierusalimschy <roberto@inf.puc-rio.br> 于2021年12月22日周三 01:56写道:
> >
> > Serious?  This bug is there for more than 10 years, and you wait to
> > announce it one minute after we announce a new release candidate?
> 
> I saw the patch
> https://github.com/lua/lua/commit/597a53bbc681089d85b082b46c2e2428dec43b86,
>  It seems that we can't create a new finalizer when closing state.
> 
> I think we can link the new finalizer at the beginning of 'tobefnz'
> list immediately when closing state.  The finalizer of _CLIBS is at
> the end, so it can avoid this issue.

I am not sure what is your point. Does the patch do not solve the
problem? Is it too restrictive? Too complex?

For context: for a log time (at least since Lua 5.2), objects created
by finalizers when closing a state are not themselves finalized (except
through this bug, by calling exit). So, the fact that "we can't create a
new finalizer when closing state" changes nothing, it's how Lua has been
in the last many years.

-- Roberto