[issue38070] visit_decref(): add an assertion to check that the object is not freed

STINNER Victor report at bugs.python.org
Tue Sep 17 19:38:47 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

msg351473 example with the new assertion and enhanced debug functions:
---
Modules/gcmodule.c:379: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed
<object at 0x7ff0038956d0 is freed>
Fatal Python error: _PyObject_AssertFailed
Python runtime state: finalizing (tstate=0x1d1c9b0)

Current thread 0x00007ff010841740 (most recent call first):
<no Python frame>
Aborted (core dumped)
---

* Obviously, "Modules/gcmodule.c:379: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed" is the first most visible enhancement
* Add "Python runtime state: finalizing (tstate=0x1d1c9b0)": Python is finalizing (Py_Finalize)
* New "<no Python frame>" in the traceback
* "<Freed object>" became "<object at 0x7ff0038956d0 is freed>": add the object address

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38070>
_______________________________________


More information about the Python-bugs-list mailing list