lua-users home
lua-l archive

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


Crap!  you're right.  Things have worked this way for so long I
completely forgot about that.  I have one builtin to a plugin and
another built as a framework for linking against modules.  thanks!

wes

On 3/22/07, Rici Lake <lua@ricilake.net> wrote:
Wesley Smith wrote:
>
> Basically if you look at the stack I posted, you'll see the following:
>
> 1) a function calls into Lua
> 2) lua calls a C function
> 3) the C function calls back into Lua
>
> I'm going in and out of Lua twice.  It's all in the same thread
> because it's all in the same stack.

Yes, but it's not the same Lua library:
 > #4    0x20d08aa4 in luaD_call at ldo.c:377
...
 > #16    0x047af020 in luaD_call

You have two instances of the Lua library, it would appear; probably one
of them statically linked into a dynamically loaded module.

That's not supported, and it causes crashes inside ltable.c, because
ltable.c uses the address of a static constant as a sentinel. If there
are two instances of the Lua library, the sentinel doesn't have a unique
value, which causes the crash.