aboutsummaryrefslogtreecommitdiff
path: root/bugs
diff options
context:
space:
mode:
Diffstat (limited to 'bugs')
-rw-r--r--bugs56
1 files changed, 55 insertions, 1 deletions
diff --git a/bugs b/bugs
index d202ee22..7b272fbb 100644
--- a/bugs
+++ b/bugs
@@ -358,7 +358,37 @@ coroutine.resume(co)
358coroutine.resume(co) --> seg. fault 358coroutine.resume(co) --> seg. fault
359]], 359]],
360report = [[by Alex Bilyk, 09/05/2003]], 360report = [[by Alex Bilyk, 09/05/2003]],
361patch = [[???]], 361patch = [[
362* ldo.c:
363325,326c325
364< if (nargs >= L->top - L->base)
365< luaG_runerror(L, "cannot resume dead coroutine");
366---
367> lua_assert(nargs < L->top - L->base);
368329c328,329
369< else if (ci->state & CI_YIELD) { /* inside a yield? */
370---
371> else { /* inside a yield */
372> lua_assert(ci->state & CI_YIELD);
373344,345d343
374< else
375< luaG_runerror(L, "cannot resume non-suspended coroutine");
376351a350,358
377> static int resume_error (lua_State *L, const char *msg) {
378> L->top = L->ci->base;
379> setsvalue2s(L->top, luaS_new(L, msg));
380> incr_top(L);
381> lua_unlock(L);
382> return LUA_ERRRUN;
383> }
384>
385>
386355a363,366
387> if (L->ci == L->base_ci && nargs >= L->top - L->base)
388> return resume_error(L, "cannot resume dead coroutine");
389> else if (!(L->ci->state & CI_YIELD)) /* not inside a yield? */
390> return resume_error(L, "cannot resume non-suspended coroutine");
391]],
362} 392}
363 393
364 394
@@ -514,3 +544,27 @@ patch = [[
514> char buff[128]; 544> char buff[128];
515]] 545]]
516} 546}
547
548
549Bug{
550what = [[syntax `local function' does not increment stack size]],
551
552report = [[Rici Lake, 26/09/2003]],
553
554example = [[
555-- must run this with precompiled code
556local a,b,c
557local function d () end
558]],
559
560patch = [[
561* lparser.c:
5621145c1145,1146
563< init_exp(&v, VLOCAL, ls->fs->freereg++);
564---
565> init_exp(&v, VLOCAL, ls->fs->freereg);
566> luaK_reserveregs(ls->fs, 1);
567]],
568
569}
570