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.

classification
Title: RuntimeError with string concatenation
Type: Stage: resolved
Components: Interpreter Core Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: Kevin.Dyer
Priority: normal Keywords:

Created on 2014-10-08 18:27 by Kevin.Dyer, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg228807 - (view) Author: Kevin Dyer (Kevin.Dyer) Date: 2014-10-08 18:27
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.
msg228808 - (view) Author: Kevin Dyer (Kevin.Dyer) Date: 2014-10-08 18:31
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.
History
Date User Action Args
2022-04-11 14:58:08adminsetgithub: 66772
2014-10-08 19:17:08r.david.murraysettitle: Segmentation fault with string concatenation -> RuntimeError with string concatenation
stage: resolved
2014-10-08 18:31:48Kevin.Dyersetstatus: open -> closed
resolution: duplicate
messages: + msg228808
2014-10-08 18:27:49Kevin.Dyercreate