Skip to content

Missing Py_CLEAR/Py_VISIT calls for Unpickler.persistent_load_attr and Pickler.persistent_id_attr #130179

Closed
@sergey-miryanov

Description

@sergey-miryanov

Bug report

Bug description:

I found that Unpickler.persistent_load_attr and Pickler.persistent_id_attr can be set, but never clear. However, I didn't find any uses of them.

Another issue, I found that PDATA_APPEND and PDATA_PUSH may lead to memory leaks if PyErr_NoMemory is raised. What do we do about resources when this happens? I've seen resources get cleared, and sometimes they don't.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions