KEMBAR78
[3.12] gh-116810: fix memory leak in ssl module (GH-123249) by miss-islington · Pull Request #124801 · python/cpython · GitHub
Skip to content

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 jeff.vanvoorst@gmail.com
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma zintensitydev@gmail.com
Co-authored-by: Gregory P. Smith greg@krypto.org
Co-authored-by: Antoine Pitrou antoine@python.org

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 <jeff.vanvoorst@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Antoine Pitrou <antoine@python.org>
@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