From 001bb46ae1b2bc0b3ce514f4a98e431656046e97 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 1 Sep 2014 13:56:01 -0300 Subject: bug: Ephemeron table can wrongly collect entry with strong key --- bugs | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/bugs b/bugs index 451531f0..67da6d14 100644 --- a/bugs +++ b/bugs @@ -1880,8 +1880,8 @@ patch = [[ +++ lundump.c 2008/04/04 19:51:41 2.7.1.4 @@ -1,5 +1,5 @@ /* --** $Id: bugs,v 1.131 2014/05/07 16:35:24 roberto Exp roberto $ -+** $Id: bugs,v 1.131 2014/05/07 16:35:24 roberto Exp roberto $ +-** $Id: bugs,v 1.132 2014/05/07 16:57:27 roberto Exp roberto $ ++** $Id: bugs,v 1.132 2014/05/07 16:57:27 roberto Exp roberto $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -3223,6 +3223,31 @@ patch = [[ ]] } +Bug{ +what = [[Ephemeron table can wrongly collect entry with strong key]], +report = [[Jörg Richter, 2014/08/22]], +since = [[5.2]], +fix = nil, +example = [[ +(This bug is very hard to reproduce, +because it depends on a specific interleaving of +events between the incremental collector and the program.) +]], +patch = [[ +--- lgc.c 2013/04/26 18:22:05 2.140.1.2 ++++ lgc.c 2014/09/01 13:24:33 +@@ -403,7 +403,7 @@ + reallymarkobject(g, gcvalue(gval(n))); /* mark it now */ + } + } +- if (prop) ++ if (g->gcstate != GCSatomic || prop) + linktable(h, &g->ephemeron); /* have to propagate again */ + else if (hasclears) /* does table have white keys? */ + linktable(h, &g->allweak); /* may have to clean white keys */ +]] +} + --[=[ Bug{ -- cgit v1.2.3-55-g6feb