lua-users home
lua-l archive

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


Lua definitely makes no use of statics/globals. At least not explicitly - rand() may store external state, etc, but I doubt that's your problem.
----- Original Message -----
Sent: Friday, May 21, 2010 10:04 PM
Subject: Statically linking to Lua from multiple shared libaries

Hello,
  I have a project that has code multiple shared libraries, two of which are linking to lua statically.  An executable links to these two shared libraries and calls code in them using the same lua_State.  Everything seems to be working fine, except I get a crash in lua_close() during application shutdown.  When I consolidate the code from the two shared libraries into one, the problem goes away.  This makes me think that there is some static data in Lua that is not contained in lua_State and that is causing this problem.  We can rebuild Lua as a shared library, but before doing so I wanted to check and see if anyone could confirm that this is in fact the problem.  Thanks!

Chris Hafey