Re: A crash when loading dll from LuaJIT (works with "regular" Lua)

  • From: Coda Highland <chighland@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 31 Dec 2012 09:06:27 -0800

On Mon, Dec 31, 2012 at 5:00 AM, Mike Pall <mike-1212@xxxxxxxxxx> wrote:
> You must not, under any circumstances, load two copies of either
> Lua or LuaJIT or a mix of both into the same address space and use
> them with the same Lua state. Statically linking any VM into a DLL
> is a recipe for disaster, in case there's another VM loaded from
> an executable or a luaXX.dll (i.e. always for your use case).
>
> --Mike
>

Is there any harm in statically linking Lua into a DLL without
exposing the symbols and using it with an internal lua_State* that's
never shared? This happens in my project, which is a plugin, and
there's a remote chance that some other third party could also choose
to use Lua at some time in the future.

If this IS a problem, I'll probably need to do something to change the
symbol names, right?

/s/ Adam

Other related posts: