[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel


Stefan Behnel  added the comment:

Thanks for the fix, Oren!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 096e41aa4e558b28b7260fe01eb21414b1458b20 by Miss Islington (bot) 
in branch '3.7':
[3.7] bpo-31758: Prevent crashes when using an uninitialized 
_elementtree.XMLParser object (GH-3997) (GH-19487)
https://github.com/python/cpython/commit/096e41aa4e558b28b7260fe01eb21414b1458b20


--

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18840
stage: backport needed -> patch review
pull_request: https://github.com/python/cpython/pull/19487

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel


Stefan Behnel  added the comment:

Let's add it to the last bug fix release of 3.7 as well. It fixes a crash bug, 
after all.

--
stage: patch review -> backport needed
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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18839
pull_request: https://github.com/python/cpython/pull/19486

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 61511488cf4e7a1cb57a38efba7e0a84a387fe58 by Miss Islington (bot) 
in branch '3.8':
bpo-31758: Prevent crashes when using an uninitialized _elementtree.XMLParser 
object (GH-3997) (GH-19485)
https://github.com/python/cpython/commit/61511488cf4e7a1cb57a38efba7e0a84a387fe58


--

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +18838
pull_request: https://github.com/python/cpython/pull/19485

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset 402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527 by Oren Milman in branch 
'master':
bpo-31758: Prevent crashes when using an uninitialized _elementtree.XMLParser 
object (GH-3997)
https://github.com/python/cpython/commit/402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527


--

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2020-04-12 Thread Stefan Behnel


Stefan Behnel  added the comment:

This has been pending for a while too long, but the fixes look good to me. They 
should still go at least into Py3.8 and later.

--
versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2017-10-14 Thread Oren Milman

Change by Oren Milman :


--
pull_requests: +3972

___
Python tracker 

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



[issue31758] various refleaks in _elementtree, and crashes when using an uninitialized XMLParser object

2017-10-14 Thread Oren Milman

Oren Milman  added the comment:

According to Serhiy's advice (https://bugs.python.org/issue31455#msg304338),
this issue now also includes some crashes in _elementtree:


The following code crashes:
import _elementtree
parser = _elementtree.XMLParser.__new__(_elementtree.XMLParser)
parser.close()

This is because _elementtree_XMLParser_close_impl() assumes that the XMLParser
object is initialized, and so it passes `self` to expat_parse(), which assumes
that `self->parser` is valid, and crashes.
Similarly, calling feed(), _parse_whole() or _setevents(), or reading the
`entity` or `target` attribute of an uninitialized XMLParser object would
result in a crash.


ISTM that PR 3956 is more complex, and already not so small, so i would soon
open another PR to fix these crashes.

--
title: various refleaks in _elementtree -> various refleaks in _elementtree, 
and crashes when using an uninitialized XMLParser object
type: resource usage -> crash

___
Python tracker 

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