aboutsummaryrefslogtreecommitdiff
path: root/testes/gc.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-03-14 12:37:19 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-03-14 12:37:19 -0300
commitc2dc6e8e947ed0c7b18d452592f722f56ee1f96a (patch)
tree2d39698d94992e158199db58d53693496250d2b6 /testes/gc.lua
parent22974326ca0d4f893849ce722cc1d65b3e228f42 (diff)
downloadlua-c2dc6e8e947ed0c7b18d452592f722f56ee1f96a.tar.gz
lua-c2dc6e8e947ed0c7b18d452592f722f56ee1f96a.tar.bz2
lua-c2dc6e8e947ed0c7b18d452592f722f56ee1f96a.zip
Missing GC barrier in 'luaV_finishset'
Diffstat (limited to 'testes/gc.lua')
-rw-r--r--testes/gc.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/testes/gc.lua b/testes/gc.lua
index 96eadad8..0693837c 100644
--- a/testes/gc.lua
+++ b/testes/gc.lua
@@ -601,6 +601,21 @@ end
601 601
602 602
603if T then 603if T then
604 collectgarbage("stop")
605 T.gcstate("pause")
606 local sup = {x = 0}
607 local a = setmetatable({}, {__newindex = sup})
608 T.gcstate("enteratomic")
609 assert(T.gccolor(sup) == "black")
610 a.x = {} -- should not break the invariant
611 assert(not (T.gccolor(sup) == "black" and T.gccolor(sup.x) == "white"))
612 T.gcstate("pause") -- complete the GC cycle
613 sup.x.y = 10
614 collectgarbage("restart")
615end
616
617
618if T then
604 print("emergency collections") 619 print("emergency collections")
605 collectgarbage() 620 collectgarbage()
606 collectgarbage() 621 collectgarbage()