Author ronaldoussoren
Recipients ronaldoussoren, xxm
Date 2021-07-23.08:48:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627030084.74.0.444680726947.issue44718@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-07-23 08:48:04ronaldoussorensetrecipients: + ronaldoussoren, xxm
2021-07-23 08:48:04ronaldoussorensetmessageid: <1627030084.74.0.444680726947.issue44718@roundup.psfhosted.org>
2021-07-23 08:48:04ronaldoussorenlinkissue44718 messages
2021-07-23 08:48:04ronaldoussorencreate