[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua segfault during C++ stack unwinding process on linux
- From: Mike Pall <mikelu-0912@...>
- Date: Mon, 28 Dec 2009 14:43:24 +0100
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