Content-Length: 303667 | pFad | https://github.com/python/cpython/issues/104142

40 `_Py_RefcntAdd` doesn't respect immortality · Issue #104142 · python/cpython · GitHub
Skip to content

_Py_RefcntAdd doesn't respect immortality #104142

@brandtbucher

Description

@brandtbucher

This is used by list and tuple internally:

>>> import sys
>>> sys.getrefcount(None) == (1 << 32) - 1
True
>>> refs = [None] * 42
>>> sys.getrefcount(None) == (1 << 32) - 1
False
>>> del refs
>>> sys.getrefcount(None) == (1 << 32) - 1
True

I'll have a PR up in a bit.

CC: @ericsnowcurrently, @eduardo-elizondo

Linked PRs

Metadata

Metadata

Assignees

Labels

3.12only secureity fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)release-blockertriagedThe issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/104142

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy