lua-users home
lua-l archive

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


Pavel Shevaev wrote:
> Could please someone clarify what's going on :) ? I'm especially
> interested in how comes dl_iterate_phdr() ends up calling lua_call?

A C++ exception is thrown which causes a cleanup of all
stack-allocated resources. One of these has a destructor which
calls back into Lua. This seems to trigger a chain of calls to
require() and then ends up crashing during an __index metamethod
call which involves module_index_event().

Recompile with debug symbols and install debug symbols for the
system libraries to get a better idea where this happens. You may
want to avoid callbacks to Lua from destructors and/or avoid using
require() in the cleanup path.

--Mike