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.

Title: Memory leak in os.rename() and other functions
Type: resource usage Stage: patch review
Components: Library (Lib) Versions: Python 3.1
Status: closed Resolution: fixed
Dependencies: 6012 Superseder:
Assigned To: Nosy List: loewis, ocean-city, pitrou
Priority: high Keywords: patch

Created on 2009-05-10 20:44 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
os_leak.patch pitrou, 2009-05-10 20:44
Messages (4)
msg87543 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-05-10 20:44
A small memory leak appeared in test_os with the PEP 383 checkins. The
leak occurs in test_rename and is due to posix_2str. Here is a patch.
msg87553 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-05-10 22:28
Committed in r72556.
msg87562 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-05-11 05:17
The problem is more general. It can always happen that another argument
conversion fails after the O& conversion had failed. Instead of going
through the code and fixing each and every usage of the FSConverter
callback, I'd rather want to discuss a more general solution, where
PyArg_ParseTuple will invoke cleanup itself.
msg87678 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-05-13 11:47
I opened #6012 to handle O& memory leak issue.
Date User Action Args
2022-04-11 14:56:48adminsetgithub: 50240
2009-05-13 15:09:47pitrousetdependencies: + enhance getargs O& to accept cleanup function
2009-05-13 11:47:23ocean-citysetnosy: + ocean-city
messages: + msg87678
2009-05-11 05:18:56loewissetmessages: + msg87562
2009-05-10 22:28:43pitrousetstatus: open -> closed
resolution: fixed
messages: + msg87553
2009-05-10 20:45:25pitroulinkissue5596 dependencies
2009-05-10 20:44:52pitroucreate