lua-users home
lua-l archive

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


>  Roberto> I don't see how that error could crash Lua.
> 
> What about the fact that L->tbclist is now pointing off the top of the
> stack? Are you guaranteed that (even after, say, a garbage collection)
> that the invariants that luaF_close relies on are still maintained?

When I said "I don't see how that error could crash Lua", that implied
that I think that the invariants that luaF_close relies on are still
maintained. (the tclist must point to an area still valid inside the
range reserved for the function; that area never shrinks, and when the
function returns all tbcs are closed anyway.  If there is a garbage
collection, all values after the top are cleared to nil.)

However, when I said "I don't see how that error could crash Lua", that
also hints that currently I do not guarantee anything, otherwise I would
use something stronger than "I don't see". :-)


>  Roberto> Our thinking in this change is that probably very few people
>  Roberto> are already using to-be-closed variables in the C API,
> 
> Hi. I'm one of those "very few people".

That changes a lot. :-)

-- Roberto