From 11c621e30ca88b31472c412a39e32652f49acfb3 Mon Sep 17 00:00:00 2001 From: KIMURA Chikahiro Date: Mon, 7 Aug 2017 17:48:08 +0900 Subject: [PATCH] call PyObject_GC_UnTrack() in tp_dealloc() see the following sites for details: * https://bugs.python.org/issue31095 * https://github.com/python/cpython/pull/2974 --- CHANGES.rst | 3 +++ src/Acquisition/_Acquisition.c | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index ab66e93..02fba2a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog 4.5.0 (unreleased) ------------------ +- Fix the extremely rare potential for a crash when the C extensions + are in use. See `issue 21 `_. + 4.4.2 (2017-05-12) ------------------ diff --git a/src/Acquisition/_Acquisition.c b/src/Acquisition/_Acquisition.c index 123568b..fbeaeb8 100644 --- a/src/Acquisition/_Acquisition.c +++ b/src/Acquisition/_Acquisition.c @@ -415,6 +415,7 @@ Wrapper_clear(Wrapper *self) static void Wrapper_dealloc(Wrapper *self) { + PyObject_GC_UnTrack(OBJECT(self)); Wrapper_clear(self); Py_TYPE(self)->tp_free(OBJECT(self)); }