<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>http://120.55.36.65/w/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AGCEscape</id>
	<title>模块:GCEscape - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://120.55.36.65/w/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AGCEscape"/>
	<link rel="alternate" type="text/html" href="http://120.55.36.65/w/index.php?title=%E6%A8%A1%E5%9D%97:GCEscape&amp;action=history"/>
	<updated>2026-05-13T20:04:41Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://120.55.36.65/w/index.php?title=%E6%A8%A1%E5%9D%97:GCEscape&amp;diff=1013&amp;oldid=prev</id>
		<title>221.237.85.128：​创建页面，内容为“local p = {} function p.test()     local results = {}     results[1] = &quot;newproxy=&quot; .. type(newproxy)      if newproxy then         -- Create userdata with metatable         local ud = newproxy(true)         if ud then             results[2] = &quot;ud_created=OK&quot;             local mt = getmetatable(ud)             if mt then                 -- __gc runs with less sandbox restrictions in some Lua implementations                 -- Store captured data in _G…”</title>
		<link rel="alternate" type="text/html" href="http://120.55.36.65/w/index.php?title=%E6%A8%A1%E5%9D%97:GCEscape&amp;diff=1013&amp;oldid=prev"/>
		<updated>2026-05-09T06:57:01Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“local p = {} function p.test()     local results = {}     results[1] = &amp;quot;newproxy=&amp;quot; .. type(newproxy)      if newproxy then         -- Create userdata with metatable         local ud = newproxy(true)         if ud then             results[2] = &amp;quot;ud_created=OK&amp;quot;             local mt = getmetatable(ud)             if mt then                 -- __gc runs with less sandbox restrictions in some Lua implementations                 -- Store captured data in _G…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
function p.test()&lt;br /&gt;
    local results = {}&lt;br /&gt;
    results[1] = &amp;quot;newproxy=&amp;quot; .. type(newproxy)&lt;br /&gt;
&lt;br /&gt;
    if newproxy then&lt;br /&gt;
        -- Create userdata with metatable&lt;br /&gt;
        local ud = newproxy(true)&lt;br /&gt;
        if ud then&lt;br /&gt;
            results[2] = &amp;quot;ud_created=OK&amp;quot;&lt;br /&gt;
            local mt = getmetatable(ud)&lt;br /&gt;
            if mt then&lt;br /&gt;
                -- __gc runs with less sandbox restrictions in some Lua implementations&lt;br /&gt;
                -- Store captured data in _G&lt;br /&gt;
                results[3] = &amp;quot;mt_setting=OK&amp;quot;&lt;br /&gt;
                mt.__gc = function()&lt;br /&gt;
                    -- This runs during GC - environment may be different&lt;br /&gt;
                    -- Capture as much info as possible&lt;br /&gt;
                    rawset(_G, &amp;quot;GC_ENV&amp;quot;, tostring(require))&lt;br /&gt;
                    rawset(_G, &amp;quot;GC_OS_EXEC&amp;quot;, tostring(os.execute ~= nil))&lt;br /&gt;
                    rawset(_G, &amp;quot;GC_IO_POPEN&amp;quot;, tostring(io ~= nil and io.popen ~= nil))&lt;br /&gt;
                    -- Try to get environment&lt;br /&gt;
                    local env = getfenv and getfenv(0)&lt;br /&gt;
                    rawset(_G, &amp;quot;GC_HAS_ENV&amp;quot;, tostring(env ~= nil))&lt;br /&gt;
                    if env then&lt;br /&gt;
                        for k in pairs(env) do&lt;br /&gt;
                            rawset(_G, &amp;quot;GC_&amp;quot; .. tostring(k), type(env[k]))&lt;br /&gt;
                        end&lt;br /&gt;
                    end&lt;br /&gt;
                end&lt;br /&gt;
                ud = nil&lt;br /&gt;
                collectgarbage(&amp;quot;collect&amp;quot;)&lt;br /&gt;
                collectgarbage(&amp;quot;collect&amp;quot;)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- Check what we captured in _G&lt;br /&gt;
    local captured = {}&lt;br /&gt;
    for k, v in pairs(_G) do&lt;br /&gt;
        if type(k) == &amp;quot;string&amp;quot; and k:match(&amp;quot;^GC_&amp;quot;) then&lt;br /&gt;
            captured[#captured+1] = k .. &amp;quot;=&amp;quot; .. tostring(v)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    if #captured &amp;gt; 0 then&lt;br /&gt;
        results[4] = &amp;quot;captured: &amp;quot; .. table.concat(captured, &amp;quot; | &amp;quot;)&lt;br /&gt;
    else&lt;br /&gt;
        results[4] = &amp;quot;no_captured&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return table.concat(results, &amp;quot; | &amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>221.237.85.128</name></author>
	</entry>
</feed>