aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-11-08 16:23:16 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-11-08 16:23:16 -0200
commite34c35abcf323aac4d6a90f3f195cd93ea195171 (patch)
treea0ade4852c568f87feb4e242e32127f3bbfc3fba
parent7a8eb83b4a4e49a1f76ddce254fce72b71149e74 (diff)
downloadlua-e34c35abcf323aac4d6a90f3f195cd93ea195171.tar.gz
lua-e34c35abcf323aac4d6a90f3f195cd93ea195171.tar.bz2
lua-e34c35abcf323aac4d6a90f3f195cd93ea195171.zip
new bug: Resuming the running coroutine makes it unyieldable
-rw-r--r--bugs34
1 files changed, 32 insertions, 2 deletions
diff --git a/bugs b/bugs
index 3d021ea2..d5f6ae41 100644
--- a/bugs
+++ b/bugs
@@ -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.127 2013/09/03 15:37:10 roberto Exp roberto $ 1883-** $Id: bugs,v 1.128 2013/11/08 17:45:10 roberto Exp roberto $
1884+** $Id: bugs,v 1.127 2013/09/03 15:37:10 roberto Exp roberto $ 1884+** $Id: bugs,v 1.128 2013/11/08 17:45:10 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 */
@@ -3177,6 +3177,36 @@ patch = [[
3177 3177
3178--[=[ 3178--[=[
3179Bug{ 3179Bug{
3180what = [[Resuming the running coroutine makes it unyieldable]],
3181report = [[Florian Nücke, 2013/10/28]],
3182since = [[5.2]],
3183fix = nil,
3184example = [[
3185-- should print 'true'
3186print(coroutine.resume(coroutine.create(function()
3187 coroutine.resume(coroutine.running())
3188 coroutine.yield()
3189end)))
3190]],
3191patch = [[
3192--- ldo.c 2013/04/19 21:03:23 2.108.1.2
3193+++ ldo.c 2013/11/08 18:20:57
3194@@ -536,2 +536,3 @@
3195 int status;
3196+ int oldnny = L->nny; /* save 'nny' */
3197 lua_lock(L);
3198@@ -557,3 +558,3 @@
3199 }
3200- L->nny = 1; /* do not allow yields */
3201+ L->nny = oldnny; /* restore 'nny' */
3202 L->nCcalls--;
3203]]
3204}
3205]=]
3206
3207
3208--[=[
3209Bug{
3180what = [[ ]], 3210what = [[ ]],
3181report = [[ ]], 3211report = [[ ]],
3182since = [[ ]], 3212since = [[ ]],