lua-users home
lua-l archive

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


On Sun, Dec 19, 2010 at 2:39 PM, pk pk <pkairevent@gmail.com> wrote:
> While trying to implement LuaThread 1.1 (by Diego Nehab) to Lua 5.2 alpha
> under linux 2.6.x, I'm always getting segfault in function
> luaD_rawrunprotected.
> It arises when im launching lua like this: lua -e "print(123)"
>
> When I'm commenting parts, that locking/unlocking lua_State mutex,
> segfault disappears! I dont know why, need help!
>
> here is a patch file that implements only problem part:
> http://pastebin.com/aipzPv3n
>
> commenting this parts: lua_lock(L), lua_unlock(L)
> segfault appears here:   LUAI_TRY(L, &lj,    (*f)(L, ud);  );

LuaThread, when I used it, segfaulted in many interesting ways in Lua
5.1. I doubt it has to do with Lua 5.2. You should look at the other
pre-emptive threading solutions that exist for Lua. I don't think
LuaThread is even being maintained anymore.

-- 
- Patrick Donnelly