Issue25691
Created on 2015-11-21 17:04 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| etree_del_attributes.patch | serhiy.storchaka, 2015-11-21 17:04 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg255063 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-11-21 17:04 | |
>>> import xml.etree.ElementTree as ET
>>> e = ET.Element('tag')
>>> del e.tag
Segmentation fault (core dumped)
Proposed patch fixes the crash.
|
|||
| msg255125 - (view) | Author: Martin Panter (martin.panter) * | Date: 2015-11-23 04:58 | |
The patch looks good to me. This may be a side effect of poor documentation. I guess the documentation at <https://docs.python.org/dev/c-api/typeobj.html#c.PyTypeObject.tp_setattro> and/or the referenced functions should mention that the they also delete attributes when the name argument is null. |
|||
| msg255129 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-11-23 06:50 | |
New changeset 852c9ed9115c by Serhiy Storchaka in branch '3.4': Issue #25691: Fixed crash on deleting ElementTree.Element attributes. https://hg.python.org/cpython/rev/852c9ed9115c New changeset 3a44f06907f1 by Serhiy Storchaka in branch '3.5': Issue #25691: Fixed crash on deleting ElementTree.Element attributes. https://hg.python.org/cpython/rev/3a44f06907f1 New changeset 936fcd0ba6b1 by Serhiy Storchaka in branch 'default': Issue #25691: Fixed crash on deleting ElementTree.Element attributes. https://hg.python.org/cpython/rev/936fcd0ba6b1 New changeset e3dea2e4f93d by Serhiy Storchaka in branch '2.7': Issue #25691: Added tests on deleting cElementTree.Element attributes. https://hg.python.org/cpython/rev/e3dea2e4f93d |
|||
| msg255132 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-11-23 07:01 | |
Thank you for your review Martin. Opened issue25701 for documenting. Interestingly, 2.7 is free from this bug. It has a check for NULL. |
|||
| msg255134 - (view) | Author: Larry Hastings (larry) * | Date: 2015-11-23 07:28 | |
This change didn't make it into 3.5.1. It will be released with 3.5.2. I've already updated the Misc/NEWS entry. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:24 | admin | set | github: 69877 |
| 2015-11-23 07:28:15 | larry | set | nosy:
+ larry messages: + msg255134 |
| 2015-11-23 07:01:10 | serhiy.storchaka | set | status: open -> closed versions: - Python 2.7 messages: + msg255132 resolution: fixed |
| 2015-11-23 06:50:56 | python-dev | set | nosy:
+ python-dev messages: + msg255129 |
| 2015-11-23 04:58:38 | martin.panter | set | nosy:
+ martin.panter messages: + msg255125 |
| 2015-11-21 17:04:39 | serhiy.storchaka | create | |