Skip to content
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

[3.8] bpo-43406: Fix possible race condition where PyErr_CheckSignals tries to execute a non-Python signal handler (GH-24756) #24762

Merged
merged 1 commit into from Mar 6, 2021

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Mar 5, 2021

We can receive signals (at the C level, in trip_signal() in signalmodule.c) while signal.signal is being called to modify the corresponding handler. Later when PyErr_CheckSignals() is called to handle the given signal, the handler may be a non-callable object and would raise a cryptic asynchronous exception..
(cherry picked from commit 68245b7)

Co-authored-by: Antoine Pitrou antoine@python.org

https://bugs.python.org/issue43406

Automerge-Triggered-By: GH:pitrou

…ls`` tries to execute a non-Python signal handler (pythonGH-24756)

We can receive signals (at the C level, in `trip_signal()` in signalmodule.c) while `signal.signal` is being called to modify the corresponding handler.  Later when `PyErr_CheckSignals()` is called to handle the given signal, the handler may be a non-callable object and would raise a cryptic asynchronous exception..
(cherry picked from commit 68245b7)

Co-authored-by: Antoine Pitrou <antoine@python.org>
@pitrou pitrou added 🤖 automerge PR will be merged once it's been approved and all CI passed awaiting merge and removed awaiting core review labels Mar 6, 2021
@miss-islington miss-islington merged commit 4715be8 into python:3.8 Mar 6, 2021
12 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Mar 6, 2021

Sorry, I can't merge this PR. Reason: Pull Request is not mergeable.

@pitrou pitrou deleted the backport-68245b7-3.8 branch Mar 6, 2021
@pitrou pitrou restored the backport-68245b7-3.8 branch Mar 6, 2021
@pitrou pitrou deleted the backport-68245b7-3.8 branch Mar 6, 2021
@pitrou pitrou restored the backport-68245b7-3.8 branch Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 automerge PR will be merged once it's been approved and all CI passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants