lua-users home
lua-l archive

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


Dear Patrick,
thanks, and what do you mean "P.S. Please don't top post." ?

------------------				 
Aurora
2010-04-13

-------------------------------------------------------------
From:Patrick Donnelly
Date:2010-04-13 10:28:11
To:Lua list
CC:
Subject:Re: Re: Re: Help ! A problem with the memroy

On Mon, Apr 12, 2010 at 10:17 PM, Aurora <bravefly@gmail.com> wrote:
> Dear Patrick,
>
> lua_settop(L, 0);
> lua_newtable(L);
> lua_replace(L, LUA_GLOBALSINDEX);
> lua_pushvalue(L, LUA_GLOBALSINDEX);
> lua_replace(L, LUA_ENVIRONINDEX);
> lua_newtable(L);
> lua_replace(L, LUA_REGISTRYINDEX);
> lua_gc(L, LUA_GCCOLLECT, 0);
>
> Your code just create new empty tables, replace the GT and registry
> with them. This will destroy the base library & my extension what loaded
> by luaI_openlib .

You're adding new requirements with each iteration of this thread.
List them out so people can help you efficiently.

You probably just want to run their file in a special environment.
However, beware that malicious files with the appropriate Lua
functions can easily circumvent the sandbox you give it.

P.S. Please don't top post.

-- 
- Patrick Donnelly