[issue18049] Re-enable threading test on macOS
Michael Felt
report at bugs.python.org
Fri Aug 2 05:52:26 EDT 2019
Michael Felt <aixtools at felt.demon.nl> 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 <report at bugs.python.org>
<https://bugs.python.org/issue18049>
_______________________________________
More information about the Python-bugs-list
mailing list