[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-06-20 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like the lzma fix is incomplete: bpo-33916, "test_lzma: 
test_refleaks_in_decompressor___init__() leaks 100 handles on Windows".

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread miss-islington

miss-islington  added the comment:


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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread miss-islington

miss-islington  added the comment:


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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5465

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5464

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread INADA Naoki

INADA Naoki  added the comment:


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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread INADA Naoki

Change by INADA Naoki :


--
pull_requests: +5463

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread INADA Naoki

Change by INADA Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread INADA Naoki

INADA Naoki  added the comment:


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


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread INADA Naoki

Change by INADA Naoki :


--
pull_requests: +5462

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread miss-islington

miss-islington  added the comment:


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


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5459

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-02-13 Thread INADA Naoki

INADA Naoki  added the comment:


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


--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2018-01-21 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

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.

--
nosy: +csabella, rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2017-10-14 Thread Oren Milman

Change by Oren Milman :


--
keywords: +patch
pull_requests: +3971
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31787] various refleaks when calling the __init__() method of an object more than once

2017-10-14 Thread Oren Milman

New submission from Oren Milman :

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.

--
components: Extension Modules
messages: 304389
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: various refleaks when calling the __init__() method of an object more 
than once
type: resource usage
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com