[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

STINNER Victor report at bugs.python.org
Thu Jan 27 08:15:54 EST 2022


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

The bpo-46476 added _Py_Deepfreeze_Fini() and _PyStaticCode_Dealloc() functions: commit c7f810b34d91a5c2fbe0a8385562015d2dd961f2. If we need to ajust _Py_RefTotal manually, *maybe* it can be done there?

I don't understand well how static/immortal code object lead to negative _Py_RefTotal. For me, Py_INCREF() and Py_DECREF() should still be used on these objects, no?

----------

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


More information about the Python-bugs-list mailing list