8000 [3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) by vstinner · Pull Request #20618 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.9] bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578) #20618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
Diff view
Diff view
Prev Previous commit
bpo-40826: PyOS_InterruptOccurred() requires GIL (GH-20578)
PyOS_InterruptOccurred() now fails with a fatal error if it is called
with the GIL released.

(cherry picked from commit cbe1296)
  • Loading branch information
vstinner committed Jun 3, 2020
commit f279e5bf224bb3494d53e3e7be5704ac5438e85a
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:c:func:`PyOS_InterruptOccurred` now fails with a fatal error if it is
called with the GIL released.
2 changes: 1 addition & 1 deletion Modules/signalmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ PyOS_FiniInterrupts(void)
int
_PyOS_InterruptOccurred(PyThreadState *tstate)
{
assert(tstate != NULL);
_Py_EnsureTstateNotNULL(tstate);
if (!_Py_ThreadCanHandleSignals(tstate->interp)) {
return 0;
}
Expand Down
0