[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Help: Crash in garbage collection (solved, thanks!)
- From: Francesco Abbate <francesco.bbt@...>
- Date: Tue, 20 Oct 2009 10:49:04 +0200
That's very interesting. Actually I was wondering if there was a method to catch errors in the Lua stack management in user library C code.
Can I have more informations on what kind of checks LUA_USE_APICHECK triggers ?
2009/10/20 Tom Miles <Tom@creative-assembly.com>
Thanks to everyone for the help. The problem was indeed stack
corruption. With LUA_USE_APICHECK defined I found two places where the
stack was growing too big. I'm surprised that we didn't have more
problems with this sooner. I'm going to leave the define in for a while
just in case there are any more. Is there anyway though of modifing lua
so that it automatically grows the stack if it needs to?
> -----Original Message-----
> From: email@example.com [mailto:lua-
> firstname.lastname@example.org] On Behalf Of Roberto Ierusalimschy
> Sent: 16 October 2009 17:34
> To: Lua list
> Subject: Re: Help: Crash in garbage collection
> > I've had to do a rebuild of the app, and now the crash has moved.
> > now in lgc.c
> > propagatemark()
> > case LUA_TTABLE:
> > traversetable()
> > -> if (!weakkey) markvalue(g, gkey(n));
> > The value of g going in to this function looks a little dubious.
> > strt.nuse = 1363, size = 2048, sweepstrgc = 2048. You said
> > cannot be more than size, but can it be equal?
> > Also GCthreshold = 2712903, as does "totalbytes" is this a bad
> > seems like it might be.
> No problem here, I guess.
> > Unfortunately this is a windows app, so I can't use valgrind. I had
> > look at Memory Validator but it didn't flag anything up, maybe I
> > using it right. It kind of looks like memory corruption being that
> > moves, but I'm suspiciois of that totalbytes count...
> > Oh, yes, this is essentially a standard lua 5.1 installation. It's
> > bitlib compiled in, and a tiny bit of added functionality to tell
> > external code of when a library is "required", but that's it.
> It looks like memory corruption. Can you reproduce this bug
> -- Roberto