diff options
| -rw-r--r-- | bugs | 31 |
1 files changed, 29 insertions, 2 deletions
| @@ -383,9 +383,11 @@ patch = [[ | |||
| 383 | > } | 383 | > } |
| 384 | > | 384 | > |
| 385 | > | 385 | > |
| 386 | 355a363,366 | 386 | 355a363,368 |
| 387 | > if (L->ci == L->base_ci && nargs >= L->top - L->base) | 387 | > if (L->ci == L->base_ci) { |
| 388 | > if (nargs >= L->top - L->base) | ||
| 388 | > return resume_error(L, "cannot resume dead coroutine"); | 389 | > return resume_error(L, "cannot resume dead coroutine"); |
| 390 | > } | ||
| 389 | > else if (!(L->ci->state & CI_YIELD)) /* not inside a yield? */ | 391 | > else if (!(L->ci->state & CI_YIELD)) /* not inside a yield? */ |
| 390 | > return resume_error(L, "cannot resume non-suspended coroutine"); | 392 | > return resume_error(L, "cannot resume non-suspended coroutine"); |
| 391 | ]], | 393 | ]], |
| @@ -568,3 +570,28 @@ patch = [[ | |||
| 568 | 570 | ||
| 569 | } | 571 | } |
| 570 | 572 | ||
| 573 | |||
| 574 | Bugs = { | ||
| 575 | |||
| 576 | what = [[count hook may be called without being set]], | ||
| 577 | |||
| 578 | report = [[Andreas Stenius, 06/10/2003]], | ||
| 579 | |||
| 580 | example = [[ | ||
| 581 | set your hooks with | ||
| 582 | |||
| 583 | lua_sethook(L, my_hook, LUA_MASKLINE | LUA_MASKRET, 1); | ||
| 584 | |||
| 585 | (It is weird to use a count > 0 without setting the count hook, | ||
| 586 | but it is not wrong.) | ||
| 587 | ]], | ||
| 588 | |||
| 589 | patch = [[ | ||
| 590 | * lvm.c: | ||
| 591 | 69c69 | ||
| 592 | < if (mask > LUA_MASKLINE) { /* instruction-hook set? */ | ||
| 593 | --- | ||
| 594 | > if (mask & LUA_MASKCOUNT) { /* instruction-hook set? */ | ||
| 595 | ]], | ||
| 596 | |||
| 597 | } | ||
