[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT x64 crash (possibly clobbered registers?)
- From: "Robert G. Jakabosky" <bobby@...>
- Date: Fri, 1 Apr 2011 01:14:13 -0700
On Thursday 31, Marco Antonio Alvarez wrote:
> Hello (yay, first post here).
>
> I'm a developer of the MMO Regnum Online which uses LUA extensively on
> both server and client. We've been watching LuaJIT 2.x development
> with great interest as it could help - theoretically - to improve our
> server concurrent player capacity.
> We can build the server (with latest LuaJIT - beta6) in both 32 and 64
> bit. 32 bit mode works, but 64bit mode crashes frequently when calling
> lua_resume (we've been adding coroutines to the server engine lately).
> For what I could figure out, the lua_resume execution ends overwriting
> some registers (r12) where the 'this' pointer was stored.
>
> Here's the troubled code:
> ...
> self->push_lua_state(T); // here self is a valid pointer
> ok = lua_resume(T, top - 2);
> self->pop_lua_state(); // here 'self' is corrupted and points to some
> weird location and the program crashes.
> ...
>
> If someone could shed a light on this, I'll be eternally grateful.
> Tell me if you need something else.
Are you using the latest HEAD revision of LuaJIT2? I reported the same bug
and it was fixed by Mike Pall.
--
Robert G. Jakabosky