Fixed bug in generational collection of userdata

During generational collection, a userdatum must become gray and
go to a gray list after being traversed (like tables), so that
'correctgraylist' can handle it to its next stage.

This commit also added minimum tests for the generational collector,
including one that would detect this bug.
This commit is contained in:
Roberto Ierusalimschy
2018-07-13 15:43:02 -03:00
parent fb18346ddd
commit 2e297d6ab3
4 changed files with 102 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
-- $Id: gc.lua,v 1.82 2018/03/12 14:19:36 roberto Exp $
-- $Id: gc.lua $
-- See Copyright Notice in file all.lua
print('testing garbage collection')
print('testing incremental garbage collection')
local debug = require"debug"