msg304389 - (view) |
Author: Oren Milman (Oren Milman) * |
Date: 2017-10-14 09:16 |
Various __init__() methods don't decref (if needed) before assigning to fields of the object's struct (i.e. assigning to `self->some_field`): - _asyncio_Task___init___impl() (in Modules/_asynciomodule.c) - _lzma_LZMADecompressor___init___impl() (in Modules/_lzmamodule.c) - _bz2_BZ2Decompressor___init___impl() (in Modules/_bz2module.c) - EVP_tp_init() (in Modules/_hashopenssl.c) - property_init_impl() (in Objects/descrobject.c) - cm_init() (in Objects/funcobject.c) - sm_init() (in Objects/funcobject.c) For example, _asyncio_Task___init___impl() does `self->task_coro = coro;` instead of `Py_XSETREF(self->task_coro, coro);`. Thus, the following code would result in at least one refleak: import _asyncio task = _asyncio.Task('foo') task.__init__('foo') I would open a PR to fix this soon. |
|
|
msg310387 - (view) |
Author: Cheryl Sabella (cheryl.sabella) *  |
Date: 2018-01-21 23:12 |
Raymond, You approved this PR pending some test cases. Would you have the chance to take another look? Thanks! Oren, it looks like you'll need to rebase before this could be merged. |
|
|
msg312113 - (view) |
Author: Inada Naoki (methane) *  |
Date: 2018-02-13 10:28 |
New changeset d019bc8319ea35e93bf4baa38098ff1b57cd3ee5 by INADA Naoki (Oren Milman) in branch 'master': bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) https://github.com/python/cpython/commit/d019bc8319ea35e93bf4baa38098ff1b57cd3ee5 |
|
|
msg312116 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-02-13 11:32 |
New changeset ef20abed7f2ae0ba54b1d287f5fe601be80c1128 by Miss Islington (bot) in branch '3.7': bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) https://github.com/python/cpython/commit/ef20abed7f2ae0ba54b1d287f5fe601be80c1128 |
|
|
msg312118 - (view) |
Author: Inada Naoki (methane) *  |
Date: 2018-02-13 13:15 |
New changeset 47316342417146f62653bc3c3dd505bfacc5e956 by INADA Naoki in branch '3.6': bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) https://github.com/python/cpython/commit/47316342417146f62653bc3c3dd505bfacc5e956 |
|
|
msg312124 - (view) |
Author: Inada Naoki (methane) *  |
Date: 2018-02-13 14:41 |
New changeset f0bc645dfede8118c84844bad319cd952c4d1905 by INADA Naoki in branch 'master': bpo-31787: Skip refleak check when _hashlib is not available (GH-5660) https://github.com/python/cpython/commit/f0bc645dfede8118c84844bad319cd952c4d1905 |
|
|
msg312126 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-02-13 15:07 |
New changeset e81a6c86c89da02a0da719926198ab72edab2e05 by Miss Islington (bot) in branch '3.7': bpo-31787: Skip refleak check when _hashlib is not available (GH-5660) https://github.com/python/cpython/commit/e81a6c86c89da02a0da719926198ab72edab2e05 |
|
|
msg312128 - (view) |
Author: miss-islington (miss-islington) |
Date: 2018-02-13 15:33 |
New changeset 5d0d0eaf3ccee4349a5bed6e7741d09d56f2ab50 by Miss Islington (bot) in branch '3.6': bpo-31787: Skip refleak check when _hashlib is not available (GH-5660) https://github.com/python/cpython/commit/5d0d0eaf3ccee4349a5bed6e7741d09d56f2ab50 |
|
|
msg320088 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2018-06-20 16:00 |
It seems like the lzma fix is incomplete: bpo-33916, "test_lzma: test_refleaks_in_decompressor___init__() leaks 100 handles on Windows". |
|
|