You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
memory leaks detected with valgrind for python -V #80514
Activity
matrixise commentedon Mar 17, 2019
I have detected 3 memory leaks when I execute python -V with valgrind -> 162 bytes.
The leaks do seem to be in pymain_init and in _PyPreConfig_ReadFromArgv (the string for the locale is not freed).
Also _PyRuntimeState_Fini does not release the memory of the mutex on runtime->xidregistry.
You can find the first status in the valgrind.log file (with the leaks).
matrixise commentedon Mar 17, 2019
The report of valgrind with no leaks.
matrixise commentedon Mar 17, 2019
@vstinner I ping you because you are the main author for the new changes in the interpreter and the PyPreConfig part.
vstinner commentedon Mar 18, 2019
I assign the issue to myself, since I'm currently working on the code: bpo-36301.
matrixise commentedon Mar 18, 2019
I close the PR 12389 because it superseded by PR 12400 (only the fix for _PyRuntimeState_Fini).
vstinner commentedon Mar 18, 2019
New changeset c183444 by Victor Stinner in branch 'master':
bpo-36301: Fix Py_Main() memory leaks (GH-12420)
c183444
vstinner commentedon Mar 19, 2019
New changeset 943395f by Victor Stinner (Stéphane Wirtel) in branch 'master':
bpo-36333: Fix leak _PyRuntimeState_Fini (GH-12400)
943395f
vstinner commentedon Mar 19, 2019
New changeset a712679 by Victor Stinner in branch 'master':
bpo-36333, bpo-36356: Fix _PyEval_FiniThreads() (GH-12432)
a712679
vstinner commentedon Mar 19, 2019
"./python -V" no longer leaks, so I close the issue. See bpo-36356 for the follow-up.