[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] lglob 0.8 Extended Globals Checker for Lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 29 Apr 2013 20:53:48 -0300
> Is there a way, in 5.2, to identify these 'global global' through byte code analyses? In the same way one could clearly and easily identify global access by checking for ([GS])ETGLOBAL in 5.1?
No because what used to be globals in 5.1 are now free names in 5.2 and
access to these is rewritten via _ENV.
> I suspect not? oh, well? so much for global checker I guess...
Perhaps if you want to make it strict but in practice static analysis
does work for ordinary program that do no mess explicitly with _ENV.
OTOH, even in 5.1 one could play obscure games like
local a="var"
_G[a]=42
and this may or may not be an access to the global var, depending on
what _G holds. (Recall that _G is not a reserved name and can hold any
value.)
- References:
- [ANN] lglob 0.8 Extended Globals Checker for Lua, steve donovan
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Luiz Henrique de Figueiredo
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, steve donovan
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Petite Abeille
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, steve donovan
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Petite Abeille
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Luiz Henrique de Figueiredo
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Petite Abeille
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Luiz Henrique de Figueiredo
- Re: [ANN] lglob 0.8 Extended Globals Checker for Lua, Petite Abeille