Michael Felt <[email protected]> added the comment:
Going to take a stab in the dark - the the issue lies here:
"./Python/errors.c"
#ifndef Py_NORMALIZE_RECURSION_LIMIT
#define Py_NORMALIZE_RECURSION_LIMIT 32
#endif
As there is not enough memory for this to run in the default memory model.
However, 32 does not seem to be a counter limit:
With this "hack" I get success:
script = """if True:
import threading
def recurse(loop=0):
loop = loop+1
if loop < 128+32+8+3:
return recurse(loop)
else:
return
def outer():
try:
recurse()
except RecursionError:
pass
w = threading.Thread(target=outer)
w.start()
w.join()
print('end of main thread')
"""
So, I hope this helps point at where we need to look to find why RecursionError
is not being returned when (I assume) memory runs out.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue18049>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com