aboutsummaryrefslogtreecommitdiff
path: root/bugs
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-07-12 16:02:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2006-07-12 16:02:50 -0300
commit0782416a747a8ebb3570f3ac84918eaa4386f213 (patch)
treed3292e11bc2f2d35f51bb4c1d4a1f9380e956927 /bugs
parent3ca9af51a4f060cf2178901a67a21f8269af3224 (diff)
downloadlua-0782416a747a8ebb3570f3ac84918eaa4386f213.tar.gz
lua-0782416a747a8ebb3570f3ac84918eaa4386f213.tar.bz2
lua-0782416a747a8ebb3570f3ac84918eaa4386f213.zip
bug: wrong limit for list constructors
Diffstat (limited to 'bugs')
-rw-r--r--bugs32
1 files changed, 32 insertions, 0 deletions
diff --git a/bugs b/bugs
index a9f53823..1c8de3fc 100644
--- a/bugs
+++ b/bugs
@@ -1013,3 +1013,35 @@ patch = [[
1013]], 1013]],
1014 1014
1015} 1015}
1016
1017Bug{
1018what = [[list constructors have wrong limit]],
1019
1020report = [[by Norman Ramsey, June 2006]],
1021
1022since = "Lua 5.1",
1023
1024example = [[
1025a = {}
1026a[1] = "x={1"
1027for i = 2, 2^20 do
1028 a[i] = 1
1029end
1030a[#a + 1] = "}"
1031s = table.concat(a, ",")
1032assert(loadstring(s))()
1033print(#x)
1034]],
1035
1036patch = [[
1037* lparser.c:
1038 static void listfield (LexState *ls, struct ConsControl *cc) {
1039 expr(ls, &cc->v);
1040- luaY_checklimit(ls->fs, cc->na, MAXARG_Bx, "items in a constructor");
1041+ luaY_checklimit(ls->fs, cc->na, MAX_INT, "items in a constructor");
1042 cc->na++;
1043 cc->tostore++;
1044 }
1045]],
1046
1047}