Bug #13949
closedrados.py uses string_at, leaks string memory
0%
Description
It looks to me very much like ctypes.string_at() allocates new memory for the string; in the case of xattrs, at least, that string memory was malloced in librados, and string_at without free means the librados copy is a leak.
There are several places where string_at is called, and I suspect they're all leaks.
Updated by Kefu Chai over 8 years ago
- Status changed from New to Need More Info
It looks to me very much like ctypes.string_at() allocates new memory for the string; in the case of xattrs, at least, that string memory was malloced in librados, and string_at without free means the librados copy is a leak.
Dan, ctypes.string_at()
does allocate new memory chunk. but it is wrapped using a PyStringObject, like other PyObjects, it is refcounted, so presumably, it is also managed by the gc of python, or do you observe some visible leak when using the rados python binding?
Updated by Samuel Just about 8 years ago
It sounds like this may not matter due to a ctypes recoding?
Updated by Josh Durgin about 8 years ago
- Status changed from Need More Info to Closed
string_at is no longer used since the conversion to cython.