Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue25691

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Crash on deleting Element attribute
Type:crashStage:resolved
Components:Extension ModulesVersions:Python 3.3, Python 3.4, Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: eli.bendersky, larry, martin.panter, python-dev, scoder, serhiy.storchaka
Priority:normalKeywords:patch

Created on2015-11-21 17:04 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
etree_del_attributes.patchserhiy.storchaka,2015-11-21 17:04review
Messages (5)
msg255063 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2015-11-21 17:04
>>> import xml.etree.ElementTree as ET>>> e = ET.Element('tag')>>> del e.tagSegmentation fault (core dumped)Proposed patch fixes the crash.
msg255125 -(view)Author: Martin Panter (martin.panter)*(Python committer)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)(Python triager)Date: 2015-11-23 06:50
New changeset852c9ed9115c by Serhiy Storchaka in branch '3.4':Issue#25691: Fixed crash on deleting ElementTree.Element attributes.https://hg.python.org/cpython/rev/852c9ed9115cNew changeset3a44f06907f1 by Serhiy Storchaka in branch '3.5':Issue#25691: Fixed crash on deleting ElementTree.Element attributes.https://hg.python.org/cpython/rev/3a44f06907f1New changeset936fcd0ba6b1 by Serhiy Storchaka in branch 'default':Issue#25691: Fixed crash on deleting ElementTree.Element attributes.https://hg.python.org/cpython/rev/936fcd0ba6b1New changesete3dea2e4f93d 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)*(Python committer)Date: 2015-11-23 07:01
Thank you for your review Martin. Openedissue25701 for documenting.Interestingly, 2.7 is free from this bug. It has a check for NULL.
msg255134 -(view)Author: Larry Hastings (larry)*(Python committer)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 theMisc/NEWS entry.
History
DateUserActionArgs
2022-04-11 14:58:24adminsetgithub: 69877
2015-11-23 07:28:15larrysetnosy: +larry
messages: +msg255134
2015-11-23 07:01:10serhiy.storchakasetstatus: open -> closed
versions: - Python 2.7
messages: +msg255132

resolution: fixed
stage: patch review -> resolved
2015-11-23 06:50:56python-devsetnosy: +python-dev
messages: +msg255129
2015-11-23 04:58:38martin.pantersetnosy: +martin.panter
messages: +msg255125
2015-11-21 17:04:39serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp