Missing GC barrier in 'luaV_finishset'
This commit is contained in:
@@ -600,6 +600,21 @@ if T then
|
||||
end
|
||||
|
||||
|
||||
if T then
|
||||
collectgarbage("stop")
|
||||
T.gcstate("pause")
|
||||
local sup = {x = 0}
|
||||
local a = setmetatable({}, {__newindex = sup})
|
||||
T.gcstate("enteratomic")
|
||||
assert(T.gccolor(sup) == "black")
|
||||
a.x = {} -- should not break the invariant
|
||||
assert(not (T.gccolor(sup) == "black" and T.gccolor(sup.x) == "white"))
|
||||
T.gcstate("pause") -- complete the GC cycle
|
||||
sup.x.y = 10
|
||||
collectgarbage("restart")
|
||||
end
|
||||
|
||||
|
||||
if T then
|
||||
print("emergency collections")
|
||||
collectgarbage()
|
||||
|
||||
Reference in New Issue
Block a user