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.

Author izbyshev
Recipients eric.snow, izbyshev, pablogsal, vstinner
Date 2019-02-13.21:19:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550092763.4.0.0286482956437.issue35984@roundup.psfhosted.org>
In-reply-to
Content
Thank you for your introduction about _xxsubinterpreters, Eric.

This particular leak is easy: it's right in _channel_send(). I've submitted a PR.

I've also done a quick scan of neighboring code, and it seems there are other leaks as well, e.g.:

* PyThread_free_lock() is not called at https://github.com/python/cpython/blob/dcb68f47f74b0cc8a1896d4a4c5a6b83c0bbeeae/Modules/_xxsubinterpretersmodule.c#L761 (and below)

* data is not released and freed at https://github.com/python/cpython/blob/dcb68f47f74b0cc8a1896d4a4c5a6b83c0bbeeae/Modules/_xxsubinterpretersmodule.c#L1387

Do you think it'd make sense to go through the module to find and fix leaks? Or is this code in an early stage for such cleanup?

As a side note, such leaks should be easily found by static analyzers such as Coverity (assuming it understands CPython allocation functions like PyMem_NEW), so it might make sense to check out its reports on the module.
History
Date User Action Args
2019-02-13 21:19:23izbyshevsetrecipients: + izbyshev, vstinner, eric.snow, pablogsal
2019-02-13 21:19:23izbyshevsetmessageid: <1550092763.4.0.0286482956437.issue35984@roundup.psfhosted.org>
2019-02-13 21:19:23izbyshevlinkissue35984 messages
2019-02-13 21:19:23izbyshevcreate