]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35983: skip trashcan for subclasses (GH-11841)
authorJeroen Demeyer <J.Demeyer@UGent.be>
Fri, 10 May 2019 17:21:11 +0000 (19:21 +0200)
committerAntoine Pitrou <antoine@python.org>
Fri, 10 May 2019 17:21:10 +0000 (19:21 +0200)
commit351c67416ba4451eb3928fa0b2e933c2f25df1a3
tree5054fe93291fa93533ddd97622f329e96a31847e
parenta2fedd8c910cb5f5b9bd568d6fd44d63f8f5cfa5
bpo-35983: skip trashcan for subclasses (GH-11841)

Add new trashcan macros to deal with a double deallocation that could occur when the `tp_dealloc` of a subclass calls the `tp_dealloc` of a base class and that base class uses the trashcan mechanism.

Patch by Jeroen Demeyer.
15 files changed:
Include/object.h
Lib/test/test_capi.py
Lib/test/test_ordered_dict.py
Misc/NEWS.d/next/Core and Builtins/2019-02-13-16-47-19.bpo-35983.bNxsXv.rst [new file with mode: 0644]
Modules/_elementtree.c
Modules/_testcapimodule.c
Objects/descrobject.c
Objects/dictobject.c
Objects/listobject.c
Objects/odictobject.c
Objects/setobject.c
Objects/tupleobject.c
Objects/typeobject.c
Python/hamt.c
Python/traceback.c