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 serhiy.storchaka
Recipients eli.bendersky, scoder, serhiy.storchaka
Date 2020-03-08.12:24:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583670244.74.0.393826922537.issue39903@roundup.psfhosted.org>
In-reply-to
Content
There is very strange code in _elementtree.Element.__getstate__ which decrement references to elements of a list before decrementing a reference to the list itself. It happens only if creating a dict fails, so it is almost impossible to reproduce, but if it happens it will likely cause a crash.

The proposed PR fixes the bug and also simplifies the code.
History
Date User Action Args
2020-03-08 12:24:04serhiy.storchakasetrecipients: + serhiy.storchaka, scoder, eli.bendersky
2020-03-08 12:24:04serhiy.storchakasetmessageid: <1583670244.74.0.393826922537.issue39903@roundup.psfhosted.org>
2020-03-08 12:24:04serhiy.storchakalinkissue39903 messages
2020-03-08 12:24:04serhiy.storchakacreate