STINNER Victor <vstin...@python.org> added the comment:
> PyOS_InterruptOccurred() now requires to hold the GIL This change impacted gdb: * https://sourceware.org/pipermail/gdb-patches/2020-May/169110.html * https://bugzilla.redhat.com/show_bug.cgi?id=1829702 gdbpy_check_quit_flag() called PyOS_InterruptOccurred() without holding the GIL. It worked in Python 3.8, but started to crash in Python 3.9 beta1. gdb had another issue, it started by always releasing the GIL and always called the Python C API with the GIL released (if I understood correctly). gdb was fixed by calling PyGILState_Ensure()/PyGILState_Release() when calling the Python C API, especially PyOS_InterruptOccurred(). Maybe the minimum would be to *document* that the GIL must be held to call PyOS_InterruptOccurred(), and that it's not a new requirements. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40826> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com