You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unsure if this intentional or not so apologies if this turns out not to be a bug.
The code for _Py_RefcntAdd does not include _Py_INCREF_STAT_INC. This appears to mean the statistics do not track these additions to the reference count, which are increments (although not increments by 1, they are increasing the ref count in a single operation).
I believe this may be an oversight because this stat should be tracked, and also because the corresponding decrement ref count code does call _Py_DECREF_STAT_INC (e.g.
Activity
ZeroIntensity commentedon Dec 4, 2024
Looks like a bug. We're missing
_Py_INCREF_IMMORTAL_STAT_INCfor immortal objects as well.EdNutting commentedon Dec 4, 2024
Thank you for such a quick reply! I'll try to clone CPython separately to create a PR to fix these over the next few days.
gh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF_STAT_INC/_Py…
pythongh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF_STAT_I…
pythongh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF_STAT_I…
[3.13] pythongh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF…
[3.13] pythongh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF…
[3.13] pythongh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF…
[3.12] gh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF_STAT_…
[3.13] gh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF_STAT_…
Eclips4 commentedon Jan 18, 2025
Thank you @EdNutting!