lua-users home
lua-l archive

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


On Sun, Sep 28, 2014 at 1:25 AM, William Ahern
<william@25thandclement.com> wrote:
> I assume you're using the volatile qualifer appropriately. But in case
> not... it's a big deal. Many times if you fail to use volatile it will be
> obvious from the core dumps. Other times you end up with Heisenbugs.

First I'd like to say that listening to you guys is like taking a
master class - very educational!

Another point to keep in mind is that recent versions of GCC tend to
optimize out stack frames by default.  I discovered this the hard way
when recompiling UnderC (which like Lua uses setjmp to get out of
error conditions).

Since we're talking about Lua implications, could one not solve the
dangling-resource problem by keeping one's important data as Lua
userdata in an array-like table?  After the jump, one could then
remove these objects from the array, up to a sentinel value set at the
jump point.  Lua GC then handles the rest ;)