New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
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. ---------- components: Extension Modules, XML messages: 363657 nosy: eli.bendersky, scoder, serhiy.storchaka priority: normal severity: normal status: open title: Double decref in _elementtree.Element.__getstate__ type: crash versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39903> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com