lua-users home
lua-l archive

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


> [...] The bad things
> happen when the programs close down.
> 
> [...]
> 
> Could any of those changes have left something for free_unlocked() to
> stumble over? The last four functions on the stack are free_unlocked(),
> __free(), do_dlclose() and __dlclose(). They are not part of Lua, are they?

When we close a state, Lua unloads the C modules it loaded, calling
'dlclose'. (It uses __gc for that.) So, this sequence is expected.

(I could not find any change from 5.3 to 5.4 that seems relevant in this
area.)

But, if the bad thing happens in free_unlocked, then maybe the
problem is being caused by memory corruption somewhere else in the
program?

-- Roberto