lua-users home
lua-l archive

RE: HELP - leak in lua 5.0.3

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


Hi,
Thanks for the tool,
 
however it seems it uses lua 5.1 syntax - 
line 10: module("gc", package.seeall) => I commented it out
line 67:for i=1, #comefrom[to] do => I changed it to for i=1,
table.getn(comefrom[to]) do
line 90:for i=1, #ignoreobjs do => I changed it to for i=1,
table.getn(ignoreobjs) do
It doesn't get rejected by the lua 5.0.3 interpreter, however it breaked in
line 96: table is nil
line 96: 	env.marked[gc] = true
So I changed at line 10 module("gc", package.seeall) => gc = _G
Now it breaks in line: 138: local mtable = debug.getmetatable(obj) =>
attempt to call field 'getmetatable' (a nil value).
Hmmm, I'll go ahead and try some more "comment out" tricks :) 
But maybe you have a version for 5.0.3 of this tool? :)
Nick
________________________________
From: Alexandra Barros [mailto:alexandra.barros@gmail.com] 
Sent: Thursday, July 13, 2006 4:53 PM
To: Lua list
Subject: Re: HELP - leak in lua 5.0.3
Hi,
Here is the tool. You can implement a function that gives you the
information you want and then call the function traverse passing your
function as a parameter. As an example, you can look at the functions
'countreferences' and 'findallpaths'. But if these functions already gives
you all the information you want... well.. that's better =) 
But it hasn't been fully tested yet. Please, report me if you find any bugs.
Thanks,
Alexandra.
On 7/12/06, Roberto Ierusalimschy < roberto@inf.puc-rio.br
<mailto:roberto@inf.puc-rio.br> > wrote: 
	> Sorry, no insights into this leak specifically, but it 
	> does bring up a possible suggestion for Lua 5.2 (or 6.0,
	> or whatever) - the ability to programatically walk or otherwise
	> instrument the not-dead object set in a similar manner to how the
	> GC does. 
	
	You can do that in Lua itself, using some reflexive facilities. I
guess
	someone in the list did some tool for this. A student of mine also
	wrote such tool (to traverse all live objects of a state). If she is
	not in the list, you may contact her directly:
	
	 Alexandra Barros <abarros at inf dot puc-rio dot br>
	
	-- Roberto
	

AltStyle によって変換されたページ (->オリジナル) /