mirror of https://github.com/rusefi/lua.git
Bug fix: Old finalized object may not be visited by GC
When an object aged OLD1 is finalized, it is moved from the list 'finobj' to the *beginning* of the list 'allgc'. So, this part of the list (and not only the survival list) must be visited by 'markold'.
This commit is contained in:
parent
3e1dc3bc67
commit
3b2444f7ee
2
lgc.c
2
lgc.c
|
@ -1140,7 +1140,7 @@ static void finishgencycle (lua_State *L, global_State *g) {
|
|||
static void youngcollection (lua_State *L, global_State *g) {
|
||||
GCObject **psurvival; /* to point to first non-dead survival object */
|
||||
lua_assert(g->gcstate == GCSpropagate);
|
||||
markold(g, g->survival, g->reallyold);
|
||||
markold(g, g->allgc, g->reallyold);
|
||||
markold(g, g->finobj, g->finobjrold);
|
||||
atomic(L);
|
||||
|
||||
|
|
Loading…
Reference in New Issue