This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Statically allocated Unicode objects leak cached representations
Type: Stage: resolved
Components: Interpreter Core, Unicode Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, jkloth, vstinner
Priority: normal Keywords: patch

Created on 2022-03-21 18:37 by jkloth, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 32032 merged jkloth, 2022-03-21 18:45
Messages (3)
msg415695 - (view) Author: Jeremy Kloth (jkloth) * Date: 2022-03-21 18:37
The newly implemented statically allocated Unicode objects do not clear their cached representations (wstr and utf-8) at exit causing leaked blocks at exit (see also issue46857).

At issue are the Unicode objects created by deepfreeze and the 1-character strings (ordinals < 256).
msg415763 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-03-22 12:53
New changeset 88872a29f19092d2fde27365af230abd6d301941 by Jeremy Kloth in branch 'main':
bpo-47084: Clear Unicode cached representations on finalization (GH-32032)
https://github.com/python/cpython/commit/88872a29f19092d2fde27365af230abd6d301941
msg415764 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-03-22 12:54
> The newly implemented statically allocated Unicode objects do not clear their cached representations (wstr and utf-8) at exit causing leaked blocks at exit (see also issue46857).

Good job to discover this single leaking memory allocation!!!
History
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91240
2022-03-22 12:54:36vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg415764

stage: patch review -> resolved
2022-03-22 12:53:59vstinnersetmessages: + msg415763
2022-03-21 18:45:41jklothsetkeywords: + patch
stage: patch review
pull_requests: + pull_request30122
2022-03-21 18:37:52jklothcreate