[Python-Dev] Could someone review GH-2974 which add missing PyObject_GC_UnTrack()?

INADA Naoki songofacandy at gmail.com
Fri Aug 18 07:04:33 EDT 2017


Hi.

I created PR which fixes potential crash.
Serhiy Storchaka approved it already, but he wants one other
review from core dev.  And I updated document after his review too.

So I want more one reviewer for the PR.
Someone help me?

https://github.com/python/cpython/pull/2974
https://bugs.python.org/issue31095


## Background

For GC types, tp_dealloc should call PyObject_GC_UnTrack() before
calling any APIs which can run arbitrary code, including Py_DECREF.

Without calling it, GC may happen during tp_dealloc and GC will find
object which refcnt == 0.

I checked all GC types and find some unsafe tp_dealloc.
Even "extending and embedding" document missed untracking.


Regards,

INADA Naoki  <songofacandy at gmail.com>


More information about the Python-Dev mailing list