aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-19 09:58:40 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-05-19 09:58:40 -0300
commit1bdc328c7542fac5101684a4ac31a25be3dff112 (patch)
tree7652b8a68f04bf160558dfb174afe0979cbe1d84
parente3d52da144dcb1179988ba315a6cb6703fe9a4f8 (diff)
downloadlua-1bdc328c7542fac5101684a4ac31a25be3dff112.tar.gz
lua-1bdc328c7542fac5101684a4ac31a25be3dff112.tar.bz2
lua-1bdc328c7542fac5101684a4ac31a25be3dff112.zip
bug: Lua crashes when building sequences with more than 2^30 elements.
bug: Table length computation overflows for sequences larger than 2^31 elements..
-rw-r--r--bugs53
1 files changed, 51 insertions, 2 deletions
diff --git a/bugs b/bugs
index d2ec34d2..9d947cac 100644
--- a/bugs
+++ b/bugs
@@ -3656,9 +3656,9 @@ It needs an "interceptor" 'memcmp' function that continues
3656reading memory after a difference is found.]], 3656reading memory after a difference is found.]],
3657patch = [[ 3657patch = [[
36582c2 36582c2
3659< ** $Id: bugs,v 1.151 2016/10/19 12:34:27 roberto Exp roberto $ 3659< ** $Id: bugs,v 1.152 2017/05/05 15:55:36 roberto Exp roberto $
3660--- 3660---
3661> ** $Id: bugs,v 1.151 2016/10/19 12:34:27 roberto Exp roberto $ 3661> ** $Id: bugs,v 1.152 2017/05/05 15:55:36 roberto Exp roberto $
3662263c263,264 3662263c263,264
3663< for (option = LUA_STRFTIMEOPTIONS; *option != '\0'; option += oplen) { 3663< for (option = LUA_STRFTIMEOPTIONS; *option != '\0'; option += oplen) {
3664--- 3664---
@@ -3746,6 +3746,55 @@ patch = [[
3746} 3746}
3747 3747
3748 3748
3749Bug{
3750what = [[Lua crashes when building sequences with more than 2^30 elements.]],
3751report = [[Viacheslav Usov, 2017/05/11]],
3752since = [[ ]],
3753fix = nil,
3754example = [[
3755-- crashes if machine has enough memory
3756local t = {}
3757for i = 1, 0x7fffffff do
3758 t[i] = i
3759end
3760]],
3761patch = [[
3762]]
3763}
3764
3765
3766Bug{
3767what = [[Table length computation overflows for sequences larger than
37682^31 elements.]],
3769report = [[Viacheslav Usov, 2017/05/12]],
3770since = [[ ]],
3771fix = nil,
3772example = [[
3773-- on a machine with enough memory
3774local t = {}
3775for i = 1, 2147483681 do
3776 t[i] = i
3777end
3778print(#t)
3779]],
3780patch = [[
3781]]
3782}
3783
3784
3785--[=[
3786Bug{
3787what = [[ ]],
3788report = [[ ]],
3789since = [[ ]],
3790fix = nil,
3791example = [[ ]],
3792patch = [[
3793]]
3794}
3795]=]
3796
3797
3749--[=[ 3798--[=[
3750Bug{ 3799Bug{
3751what = [[ ]], 3800what = [[ ]],