This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients brett.cannon, martin.panter, scoder, serhiy.storchaka
Date 2015-12-16.00:47:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450226857.18.0.17117871144.issue25873@psf.upfronthosting.co.za>
In-reply-to
Content
Looks technically correct as far as my knowledge of the malloc routines goes. What was the problem with references that you fixed? Maybe with parent_stack_push_new() failure?

The main reference counting bug that sticks out to me is with the text and tail elements, because element_get_text() etc return a borrowed reference. It might be good to fix this while you are at it:

>>> element = Element("tag")
>>> class Text:
...     def __bool__(self):
...         element.text = "changed"
...         return True
... 
>>> element.text = Text()
>>> i = element.itertext()
>>> next(i)
Segmentation fault (core dumped)
[Exit 139]
History
Date User Action Args
2015-12-16 00:47:37martin.pantersetrecipients: + martin.panter, brett.cannon, scoder, serhiy.storchaka
2015-12-16 00:47:37martin.pantersetmessageid: <1450226857.18.0.17117871144.issue25873@psf.upfronthosting.co.za>
2015-12-16 00:47:37martin.panterlinkissue25873 messages
2015-12-16 00:47:36martin.pantercreate