Skip to content

[3.12] gh-116810: fix memory leak in ssl module (GH-123249) #124801

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 1 commit into from
Sep 30, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 30, 2024

Resolve a memory leak introduced in CPython 3.10's :mod:ssl when the :attr:ssl.SSLSocket.session property was accessed. Speeds up read and write access to said property by no longer unnecessarily cloning session objects via serialization.

(cherry picked from commit 7e7223e)

Co-authored-by: Jeffrey R. Van Voorst [email protected]
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma [email protected]
Co-authored-by: Gregory P. Smith [email protected]
Co-authored-by: Antoine Pitrou [email protected]

Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the :attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and write access to said property by no longer unnecessarily cloning session objects via serialization.

(cherry picked from commit 7e7223e)

Co-authored-by: Jeffrey R. Van Voorst <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <[email protected]>
Co-authored-by: Gregory P. Smith <[email protected]>
Co-authored-by: Antoine Pitrou <[email protected]>
@gpshead gpshead enabled auto-merge (squash) September 30, 2024 19:46
@gpshead gpshead merged commit 186cc40 into python:3.12 Sep 30, 2024
32 checks passed
john-nosky pushed a commit to Ezurio/wb-buildroot that referenced this pull request May 8, 2025
This change backports an upstream patch to fix a memory leak in CPython's SSL
session handling introduced in Python 3.10.

python/cpython#123249
python/cpython#124801
python/cpython@def2582

Refs: PROD-24111
Joseph-Conley pushed a commit to Ezurio/wb-buildroot that referenced this pull request May 13, 2025
This change backports an upstream patch to fix a memory leak in CPython's SSL
session handling introduced in Python 3.10.

python/cpython#123249
python/cpython#124801
python/cpython@def2582

Refs: PROD-24111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants