[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: code causing seg fault
- From: "Eric Ries" <eries@...>
- Date: Fri, 29 Jun 2001 12:24:46 -0700
> -----Original Message-----
> From: email@example.com
> [mailto:firstname.lastname@example.org]On Behalf Of Roberto
> Sent: Friday, June 29, 2001 7:41 AM
> To: Multiple recipients of list
> Subject: Re: code causing seg fault
> > The fault is at
> > line 258 in ltable.c (in luaH_set):
> > while (othern->next != mp) othern = othern->next; /*
> find previous */
> > othern is NULL. mp->key is also all zeros.
> That is strange. mp->key shouldn't be all zeros (if the tag is zero, the
> value should be a valid TString pointer).
Can you think of any condition that would cause this to happen?
> > My guess is that I am causing Lua to attempt to
> > access an already-deleted C++ pointer
> The only place where Lua accesses "user" pointers is when calling C
> functions, but it is not common to delete them. Lua never accesses an
> userdata (I hope).
Yes, I do not think the function pointers are being deleted. I do
occaisionally delete C++ objects from Lua, using special wrapper functions
(via toLua). I don't think that would cause a problem unless toLua
seperately tried to free the data again...
Any other ideas?