[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Possible bug in Lua's Garbage Collector
- From: Chris <coderight@...>
- Date: Thu, 29 May 2008 07:06:15 -0400
On Thu, May 29, 2008 at 6:18 AM, Patrick Donnelly
<batrick.donnelly@gmail.com> wrote:
> I've been desperately trying to track down a problem that arose while
> working on Nmap's scripting engine. I had a userdata that I pushed
> onto the stack, and later (while it was still on the stack), it was
> finalized unexpectedly. I've tried hard to reproduce the problem into
I don't have time to look at all your logic but a couple things stuck out.
1. Check the return value of lua_call().
2. Instead of printing "hereX", print out the value of lua_gettop() so
you can see what is happening to the stack. This seems like the most
likely problem. Your user data is probably getting removed from the
stack and subsequently collected.
--
// Chris