Skip to content

Commit

Permalink
call PyObject_GC_UnTrack() in tp_dealloc()
Browse files Browse the repository at this point in the history
    see the following sites for details:
    * https://bugs.python.org/issue31095
    * python/cpython#2974
  • Loading branch information
KIMURA Chikahiro authored and hannosch committed Dec 1, 2017
1 parent e864f41 commit 95a045d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
2.13.12 (unreleased)
--------------------

- Fix the extremely rare potential for a crash when the C extensions
are in use. See `issue 21 <https://github.com/zopefoundation/Acquisition/issues/21>`_.


2.13.11 (2016-09-05)
--------------------
Expand Down
5 changes: 3 additions & 2 deletions src/Acquisition/_Acquisition.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ Wrapper_clear(Wrapper *self)
static void
Wrapper_dealloc(Wrapper *self)
{
Wrapper_clear(self);
self->ob_type->tp_free((PyObject*)self);
PyObject_GC_UnTrack(OBJECT(self));
Wrapper_clear(self);
self->ob_type->tp_free((PyObject*)self);
}

static PyObject *
Expand Down

0 comments on commit 95a045d

Please sign in to comment.