STINNER Victor <victor.stin...@gmail.com> added the comment: I don't think that we can fix this issue. I suggest to close it as WONTFIX.
> sys.setrecursionlimit(3000) While Python does its best to catch stack overflow, the C implementation of CPython can exhaust the stack memory (8 MB in Linux?) and then crash with a "stack overflow". I suggest to rewrite your algorithm to reduce the maximum stack depth. Or maybe try to find a way to extend the maximum size of the stack (is it possible without rebuilding Python?). See for example RLIMIT_STACK of the resource module on Unix. > On linux x86-64 with python 3.6.3 and python 3.7.0a2+ I get a RecursionError: > maximum recursion depth exceeded. The exact memory usage depends on the Python version and maybe compiler flags. We reduce the stack usage in Python 3.7, search for "Stack consumption" in: https://vstinner.github.io/contrib-cpython-2017q1.html ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32022> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com