This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author imz
Recipients imz
Date 2018-03-27.10:10:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522145451.62.0.467229070634.issue33153@psf.upfronthosting.co.za>
In-reply-to
Content
The issue https://bugs.python.org/msg314475 has arisen for tuples (but not for lists, as in the example there) in 2.7.14 for me. How should we fix it in a better way?

This bug is not reproducible in python 3.5.4.

[builder@localhost ~]$ python
Python 2.7.14 (default, Nov  7 2017, 17:07:17) 
[GCC 6.3.1 20170118 (ALT 6.3.1-alt2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = [0] * 2**20
>>> x *= 2**20
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError
>>> x = [0,0,0,0,0,0] * 2**20
>>> x *= 2**20
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError
>>> x = ('a', 'b')
>>> x = ('a', 'b') * 2**20
>>> x *= 2**20
Segmentation fault
[builder@localhost ~]$ python --version
Python 2.7.14
[builder@localhost ~]$ python
Python 2.7.14 (default, Nov  7 2017, 17:07:17) 
[GCC 6.3.1 20170118 (ALT 6.3.1-alt2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxsize
2147483647
>>> sys.maxint
2147483647
>>> 
[builder@localhost ~]$ python RPM/BUILD/Python-2.7.14/Lib/test/test_tuple.py
test_addmul (__main__.TupleTest) ... ok
test_bigrepeat (__main__.TupleTest) ... Segmentation fault
[builder@localhost ~]$
History
Date User Action Args
2018-03-27 10:10:51imzsetrecipients: + imz
2018-03-27 10:10:51imzsetmessageid: <1522145451.62.0.467229070634.issue33153@psf.upfronthosting.co.za>
2018-03-27 10:10:51imzlinkissue33153 messages
2018-03-27 10:10:51imzcreate