-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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.12] gh-76785: Use Pending Calls When Releasing Cross-Interpreter Data (gh-109556) #109586
Conversation
…ta (pythongh-109556) This fixes some crashes in the _xxinterpchannels module, due to a race between interpreters. (cherry picked from commit fd7e08a) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Backporting this to 3.12 will have to be done in a way that does not introduce the new _PyCrossInterpreterData_ReleaseAndRawFree() into the public ABI. |
@@ -13,6 +13,8 @@ extern "C" { | |||
#include "pycore_gil.h" // struct _gil_runtime_state | |||
|
|||
|
|||
typedef int (*_Py_pending_call_func)(void *); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this refactoring should be done in 3.12.1. Is there a reason not to leave it just 'int (*func)(void *)' in a few places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, _Py_pending_call_func()
is not necessary. I'm fine with dropping it.
I didn't figure out how to modify the miss-islington branch so I've created a new PR: gh-112288. |
I've merged this change through gh-112288. |
This fixes some crashes in the _xxinterpchannels module, due to a race between interpreters.
(cherry picked from commit fd7e08a)
Co-authored-by: Eric Snow ericsnowcurrently@gmail.com