Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leak in ctypes.resize() #60832

Closed
pitrou opened this issue Dec 6, 2012 · 4 comments
Closed

leak in ctypes.resize() #60832

pitrou opened this issue Dec 6, 2012 · 4 comments
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir

Comments

@pitrou
Copy link
Member

pitrou commented Dec 6, 2012

BPO 16628
Nosy @amauryfa, @abalkin, @pitrou, @skrah, @meadori
Files
  • ctypesresizeleak.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-12-08.10:10:40.527>
    created_at = <Date 2012-12-06.19:58:48.701>
    labels = ['library', 'performance']
    title = 'leak in ctypes.resize()'
    updated_at = <Date 2012-12-08.10:10:40.526>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2012-12-08.10:10:40.526>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-12-08.10:10:40.527>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2012-12-06.19:58:48.701>
    creator = 'pitrou'
    dependencies = []
    files = ['28226']
    hgrepos = []
    issue_num = 16628
    keywords = ['patch']
    message_count = 4.0
    messages = ['177052', '177112', '177149', '177150']
    nosy_count = 6.0
    nosy_names = ['amaury.forgeotdarc', 'belopolsky', 'pitrou', 'skrah', 'meador.inge', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue16628'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3', 'Python 3.4']

    @pitrou
    Copy link
    Member Author

    pitrou commented Dec 6, 2012

    ctypes.resize() (and/or the deallocator) can leak because of a logic error. Attached patch seems to fix it.

    @pitrou pitrou added stdlib Python modules in the Lib dir performance Performance or resource usage labels Dec 6, 2012
    @meadori
    Copy link
    Member

    meadori commented Dec 7, 2012

    This is the same as bpo-13091. I proposed a similar fix there, but yours is more complete and seems reasonable to me.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 8, 2012

    New changeset 1996171cfb96 by Antoine Pitrou in branch '3.2':
    Issue bpo-16628: Fix a memory leak in ctypes.resize().
    http://hg.python.org/cpython/rev/1996171cfb96

    New changeset cae5f3266b81 by Antoine Pitrou in branch '3.3':
    Issue bpo-16628: Fix a memory leak in ctypes.resize().
    http://hg.python.org/cpython/rev/cae5f3266b81

    New changeset def01022870a by Antoine Pitrou in branch 'default':
    Issue bpo-16628: Fix a memory leak in ctypes.resize().
    http://hg.python.org/cpython/rev/def01022870a

    New changeset df5a86a22310 by Antoine Pitrou in branch '2.7':
    Issue bpo-16628: Fix a memory leak in ctypes.resize().
    http://hg.python.org/cpython/rev/df5a86a22310

    @pitrou
    Copy link
    Member Author

    pitrou commented Dec 8, 2012

    Should be fixed now.

    @pitrou pitrou closed this as completed Dec 8, 2012
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    performance Performance or resource usage stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants