diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-11-08 16:23:16 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-11-08 16:23:16 -0200 |
| commit | e34c35abcf323aac4d6a90f3f195cd93ea195171 (patch) | |
| tree | a0ade4852c568f87feb4e242e32127f3bbfc3fba | |
| parent | 7a8eb83b4a4e49a1f76ddce254fce72b71149e74 (diff) | |
| download | lua-e34c35abcf323aac4d6a90f3f195cd93ea195171.tar.gz lua-e34c35abcf323aac4d6a90f3f195cd93ea195171.tar.bz2 lua-e34c35abcf323aac4d6a90f3f195cd93ea195171.zip | |
new bug: Resuming the running coroutine makes it unyieldable
| -rw-r--r-- | bugs | 34 |
1 files changed, 32 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.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 | --[=[ |
| 3179 | Bug{ | 3179 | Bug{ |
| 3180 | what = [[Resuming the running coroutine makes it unyieldable]], | ||
| 3181 | report = [[Florian Nücke, 2013/10/28]], | ||
| 3182 | since = [[5.2]], | ||
| 3183 | fix = nil, | ||
| 3184 | example = [[ | ||
| 3185 | -- should print 'true' | ||
| 3186 | print(coroutine.resume(coroutine.create(function() | ||
| 3187 | coroutine.resume(coroutine.running()) | ||
| 3188 | coroutine.yield() | ||
| 3189 | end))) | ||
| 3190 | ]], | ||
| 3191 | patch = [[ | ||
| 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 | --[=[ | ||
| 3209 | Bug{ | ||
| 3180 | what = [[ ]], | 3210 | what = [[ ]], |
| 3181 | report = [[ ]], | 3211 | report = [[ ]], |
| 3182 | since = [[ ]], | 3212 | since = [[ ]], |
