Bug report
|
#undef Py_DECREF |
|
#define Py_DECREF(arg) \ |
|
do { \ |
|
PyObject *op = _PyObject_CAST(arg); \ |
|
if (_Py_IsImmortal(op)) { \ |
|
_Py_DECREF_IMMORTAL_STAT_INC(); \ |
|
break; \ |
|
} \ |
|
_Py_DECREF_STAT_INC(); \ |
|
if (--op->ob_refcnt == 0) { \ |
|
destructor dealloc = Py_TYPE(op)->tp_dealloc; \ |
|
(*dealloc)(op); \ |
|
} \ |
|
} while (0) |
Tracemalloc only handles PyRefTracer_CREATE events and we don't have any tests for PyRefTracer_DESTROY events.
EDIT: _testcapimodule.c tests PyRefTracer_DESTROY events, but only through the C API and not the Python interpreter.
Linked PRs
Bug report
cpython/Python/ceval.c
Lines 72 to 85 in 6c450f4
Tracemalloc only handles
PyRefTracer_CREATEevents and we don't have any tests forPyRefTracer_DESTROYevents.EDIT:
_testcapimodule.ctestsPyRefTracer_DESTROYevents, but only through the C API and not the Python interpreter.Linked PRs
_PyReftracerTrackto cevalPy_DECREF(GH-130689) #131195