diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-06-15 12:01:36 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-06-15 12:01:36 -0300 |
commit | 993c58fde3a85c27f52f094002ec57dabca81028 (patch) | |
tree | a58dcffd888199bc67da47462f9adc9c3cf5d949 | |
parent | d49b2887282b86a5e6f40a386511aa8040f3c7b0 (diff) | |
download | lua-github-993c58fde3a85c27f52f094002ec57dabca81028.tar.gz |
In 'lua_checkmemory', userdata can be gray, too
Since commit ca6fe7449a74, userdata with uservalues can be gray
and can belong to gray lists ('gclist').
-rw-r--r-- | ltests.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -519,6 +519,10 @@ static void checkgraylist (global_State *g, GCObject *o) { case LUA_VCCL: o = gco2ccl(o)->gclist; break; case LUA_VTHREAD: o = gco2th(o)->gclist; break; case LUA_VPROTO: o = gco2p(o)->gclist; break; + case LUA_VUSERDATA: + lua_assert(gco2u(o)->nuvalue > 0); + o = gco2u(o)->gclist; + break; default: lua_assert(0); /* other objects cannot be in a gray list */ } } |