diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-06-11 14:49:37 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-06-11 14:49:37 -0300 |
| commit | 78d986590060b615334ac214b6cc5b7d951b1d58 (patch) | |
| tree | 92a2ace28485eda9bacc146f116061f8a335ed46 | |
| parent | cc2a60ecb7e4c57ed31e5c5c3f49d8dc7447acc5 (diff) | |
| download | lua-5.2.1.tar.gz lua-5.2.1.tar.bz2 lua-5.2.1.zip | |
bugs: Internal Lua values may escape through the debug API +v5.2.1
Problems when yielding from debug hooks
| -rw-r--r-- | bugs | 41 |
1 files changed, 39 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.113 2012/04/12 16:25:25 roberto Exp roberto $ | 1883 | -** $Id: bugs,v 1.114 2012/05/11 14:10:28 roberto Exp roberto $ |
| 1884 | +** $Id: bugs,v 1.113 2012/04/12 16:25:25 roberto Exp roberto $ | 1884 | +** $Id: bugs,v 1.114 2012/05/11 14:10:28 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 | */ |
| @@ -2648,6 +2648,43 @@ patch = [[ | |||
| 2648 | ]] | 2648 | ]] |
| 2649 | } | 2649 | } |
| 2650 | 2650 | ||
| 2651 | Bug{ | ||
| 2652 | what = [[Internal Lua values may escape through the debug API]], | ||
| 2653 | report = [[Dan Tull, 2012/04/20]], | ||
| 2654 | since = [[5.1]], | ||
| 2655 | example = [[ | ||
| 2656 | -- for Lua 5.1 | ||
| 2657 | local firsttime = true | ||
| 2658 | local function foo () | ||
| 2659 | if firsttime then | ||
| 2660 | firsttime = false | ||
| 2661 | return "a = 1" | ||
| 2662 | else | ||
| 2663 | for i = 1, 10 do | ||
| 2664 | print(debug.getlocal(2, i)) | ||
| 2665 | end | ||
| 2666 | end | ||
| 2667 | end | ||
| 2668 | |||
| 2669 | print(load(foo)) -- prints some lines and then seg. fault. | ||
| 2670 | ]], | ||
| 2671 | patch = [[ | ||
| 2672 | ]] | ||
| 2673 | } | ||
| 2674 | |||
| 2675 | Bug{ | ||
| 2676 | what = [[Problems when yielding from debug hooks]], | ||
| 2677 | report = [[Erik Cassel, 2012/06/05]], | ||
| 2678 | since = [[5.2.0]], | ||
| 2679 | example = [[ | ||
| 2680 | Set, in C, a line hook that simply yields, | ||
| 2681 | and then call any Lua function. | ||
| 2682 | You get an infinite loop of yields. | ||
| 2683 | ]], | ||
| 2684 | patch = [[ | ||
| 2685 | ]] | ||
| 2686 | } | ||
| 2687 | |||
| 2651 | 2688 | ||
| 2652 | --[=[ | 2689 | --[=[ |
| 2653 | Bug{ | 2690 | Bug{ |
