diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-09-01 13:56:01 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-09-01 13:56:01 -0300 |
commit | 001bb46ae1b2bc0b3ce514f4a98e431656046e97 (patch) | |
tree | c8197b0cded7046be86e396e0d098aed2e206e46 /bugs | |
parent | 9b25347a6752d27e7ff74a2ed82301ead1bc9a1b (diff) | |
download | lua-001bb46ae1b2bc0b3ce514f4a98e431656046e97.tar.gz lua-001bb46ae1b2bc0b3ce514f4a98e431656046e97.tar.bz2 lua-001bb46ae1b2bc0b3ce514f4a98e431656046e97.zip |
bug: Ephemeron table can wrongly collect entry with strong key
Diffstat (limited to 'bugs')
-rw-r--r-- | bugs | 29 |
1 files changed, 27 insertions, 2 deletions
@@ -1880,8 +1880,8 @@ patch = [[ | |||
1880 | +++ lundump.c 2008/04/04 19:51:41 2.7.1.4 | 1880 | +++ lundump.c 2008/04/04 19:51:41 2.7.1.4 |
1881 | @@ -1,5 +1,5 @@ | 1881 | @@ -1,5 +1,5 @@ |
1882 | /* | 1882 | /* |
1883 | -** $Id: bugs,v 1.131 2014/05/07 16:35:24 roberto Exp roberto $ | 1883 | -** $Id: bugs,v 1.132 2014/05/07 16:57:27 roberto Exp roberto $ |
1884 | +** $Id: bugs,v 1.131 2014/05/07 16:35:24 roberto Exp roberto $ | 1884 | +** $Id: bugs,v 1.132 2014/05/07 16:57:27 roberto Exp roberto $ |
1885 | ** load precompiled Lua chunks | 1885 | ** load precompiled Lua chunks |
1886 | ** See Copyright Notice in lua.h | 1886 | ** See Copyright Notice in lua.h |
1887 | */ | 1887 | */ |
@@ -3223,6 +3223,31 @@ patch = [[ | |||
3223 | ]] | 3223 | ]] |
3224 | } | 3224 | } |
3225 | 3225 | ||
3226 | Bug{ | ||
3227 | what = [[Ephemeron table can wrongly collect entry with strong key]], | ||
3228 | report = [[Jörg Richter, 2014/08/22]], | ||
3229 | since = [[5.2]], | ||
3230 | fix = nil, | ||
3231 | example = [[ | ||
3232 | (This bug is very hard to reproduce, | ||
3233 | because it depends on a specific interleaving of | ||
3234 | events between the incremental collector and the program.) | ||
3235 | ]], | ||
3236 | patch = [[ | ||
3237 | --- lgc.c 2013/04/26 18:22:05 2.140.1.2 | ||
3238 | +++ lgc.c 2014/09/01 13:24:33 | ||
3239 | @@ -403,7 +403,7 @@ | ||
3240 | reallymarkobject(g, gcvalue(gval(n))); /* mark it now */ | ||
3241 | } | ||
3242 | } | ||
3243 | - if (prop) | ||
3244 | + if (g->gcstate != GCSatomic || prop) | ||
3245 | linktable(h, &g->ephemeron); /* have to propagate again */ | ||
3246 | else if (hasclears) /* does table have white keys? */ | ||
3247 | linktable(h, &g->allweak); /* may have to clean white keys */ | ||
3248 | ]] | ||
3249 | } | ||
3250 | |||
3226 | 3251 | ||
3227 | --[=[ | 3252 | --[=[ |
3228 | Bug{ | 3253 | Bug{ |