Skip to content

gh-134698: Hold a lock when the thread state is detached in ssl #134724

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 10 commits into from
Jul 25, 2025
Prev Previous commit
Next Next commit
Fix _PySSL_FIX_ERRNO silliness.
  • Loading branch information
ZeroIntensity committed May 26, 2025
commit d2f5cc1c0235b71aa3910c9d2610c5624c3eca09
1 change: 0 additions & 1 deletion Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,6 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
PySSL_BEGIN_ALLOW_THREADS(sslctx)
self->ssl = SSL_new(ctx);
PySSL_END_ALLOW_THREADS(sslctx)
_PySSL_FIX_ERRNO;
if (self->ssl == NULL) {
Py_DECREF(self);
_setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__);
Expand Down
1 change: 1 addition & 0 deletions Modules/_ssl/debughelpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ _PySSLContext_set_keylog_filename(PyObject *op, PyObject *arg,
Py_BEGIN_ALLOW_THREADS
BIO_free_all(bio);
Py_END_ALLOW_THREADS
_PySSL_FIX_ERRNO;
}

if (arg == Py_None) {
Expand Down
Loading