diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-05-19 09:58:40 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-05-19 09:58:40 -0300 |
commit | 1bdc328c7542fac5101684a4ac31a25be3dff112 (patch) | |
tree | 7652b8a68f04bf160558dfb174afe0979cbe1d84 | |
parent | e3d52da144dcb1179988ba315a6cb6703fe9a4f8 (diff) | |
download | lua-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-- | bugs | 53 |
1 files changed, 51 insertions, 2 deletions
@@ -3656,9 +3656,9 @@ It needs an "interceptor" 'memcmp' function that continues | |||
3656 | reading memory after a difference is found.]], | 3656 | reading memory after a difference is found.]], |
3657 | patch = [[ | 3657 | patch = [[ |
3658 | 2c2 | 3658 | 2c2 |
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 $ |
3662 | 263c263,264 | 3662 | 263c263,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 | ||
3749 | Bug{ | ||
3750 | what = [[Lua crashes when building sequences with more than 2^30 elements.]], | ||
3751 | report = [[Viacheslav Usov, 2017/05/11]], | ||
3752 | since = [[ ]], | ||
3753 | fix = nil, | ||
3754 | example = [[ | ||
3755 | -- crashes if machine has enough memory | ||
3756 | local t = {} | ||
3757 | for i = 1, 0x7fffffff do | ||
3758 | t[i] = i | ||
3759 | end | ||
3760 | ]], | ||
3761 | patch = [[ | ||
3762 | ]] | ||
3763 | } | ||
3764 | |||
3765 | |||
3766 | Bug{ | ||
3767 | what = [[Table length computation overflows for sequences larger than | ||
3768 | 2^31 elements.]], | ||
3769 | report = [[Viacheslav Usov, 2017/05/12]], | ||
3770 | since = [[ ]], | ||
3771 | fix = nil, | ||
3772 | example = [[ | ||
3773 | -- on a machine with enough memory | ||
3774 | local t = {} | ||
3775 | for i = 1, 2147483681 do | ||
3776 | t[i] = i | ||
3777 | end | ||
3778 | print(#t) | ||
3779 | ]], | ||
3780 | patch = [[ | ||
3781 | ]] | ||
3782 | } | ||
3783 | |||
3784 | |||
3785 | --[=[ | ||
3786 | Bug{ | ||
3787 | what = [[ ]], | ||
3788 | report = [[ ]], | ||
3789 | since = [[ ]], | ||
3790 | fix = nil, | ||
3791 | example = [[ ]], | ||
3792 | patch = [[ | ||
3793 | ]] | ||
3794 | } | ||
3795 | ]=] | ||
3796 | |||
3797 | |||
3749 | --[=[ | 3798 | --[=[ |
3750 | Bug{ | 3799 | Bug{ |
3751 | what = [[ ]], | 3800 | what = [[ ]], |