Ronald Oussoren <ronaldousso...@mac.com> added the comment:
The problem is related to recursion, the code basically ends up with an unlimited number of iterations of select.select and test_select_mutated on the call stack and this doesn't trigger the stack depth checker. The following definition of class F triggers the same error: class F: def fileno(self): test_select_mutated() return self.fileno() The call stack behaviour can be observed by using the fault handler (``python3.9 -Xfaulthandler crash.py``), although you won't see select.select in the traceback due to it being a C extension function. Fixing this would basically require adding a stack depth check to the PyObject_Call family of functions. I don't know if a PR for that would be accepted due to the possible performance impact. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44718> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com