[issue22582] Segmentation fault with string concatenation

Kevin Dyer report at bugs.python.org
Wed Oct 8 20:31:48 CEST 2014


Kevin Dyer added the comment:

The following can be used to generate a file called ```mega_concat.py```:
```python
N = 2**17
my_array = []
for i in range(N):
  my_array.append("\"\"")
print '+'.join(my_array)
```

Then:

```console
$ python mega_concat.py 
Segmentation fault (core dumped)
$ python3 mega_concat.py 
RuntimeError: maximum recursion depth exceeded during compilation
```

Trying to debug this and it seems like it's a simple out-of-memory issue.

----------
resolution:  -> duplicate
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22582>
_______________________________________


More information about the Python-bugs-list mailing list