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 vstinner
Recipients Kevin.Dyer, josh.r, vstinner
Date 2014-10-09.10:02:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412848924.48.0.586460857268.issue22583@psf.upfronthosting.co.za>
In-reply-to
Content
> Then, on Ubuntu 14.04, 32-bit:
> $ python mega_concat.py 
> Segmentation fault (core dumped)

What is your Python version? It looks like Ubuntu Trusty provides Python 2.7.6. I'm unable to reproduce the issue on ArchLinux 32-bit with Python 2.7.8. The issue was maybe fixed between 2.7.6 and 2.7.8.

[haypo@arch32 ~]$ cat megaconcat.py 

N = 2**17
my_array = []
for i in range(N):
  my_array.append("\"\"")
print('+'.join(my_array))

[haypo@arch32 ~]$ python2 -V
Python 2.7.8

[haypo@arch32 ~]$ ulimit -v 8000
[haypo@arch32 ~]$ python2 megaconcat.py 
Traceback (most recent call last):
  File "megaconcat.py", line 5, in <module>
    my_array.append("\"\"")
MemoryError
History
Date User Action Args
2014-10-09 10:02:04vstinnersetrecipients: + vstinner, josh.r, Kevin.Dyer
2014-10-09 10:02:04vstinnersetmessageid: <1412848924.48.0.586460857268.issue22583@psf.upfronthosting.co.za>
2014-10-09 10:02:04vstinnerlinkissue22583 messages
2014-10-09 10:02:04vstinnercreate