Skip to content

Memory leak in typeobject.c for slots update #155978

Description

@nascheme

Bug report

Bug description:

This bug was introduced by gh-133177. The assumption was that the number of slots to be updated could not exceed a fixed value. However, with subclasses, that's not true. The update_slot_after_setattr() correctly makes the slot updates in that case but doesn't free the heap allocated chunks, leaking memory.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions