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

memory leak in PyModule_Create2 #59599

Closed
jll mannequin opened this issue Jul 19, 2012 · 4 comments
Closed

memory leak in PyModule_Create2 #59599

jll mannequin opened this issue Jul 19, 2012 · 4 comments
Assignees
Labels
performance Performance or resource usage

Comments

@jll
Copy link
Mannequin

jll mannequin commented Jul 19, 2012

BPO 15394
Nosy @jcea, @meadori
Files
  • moduleobject.patch: patch on objects/moduleobject.c
  • 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 = 'https://github.com/meadori'
    closed_at = <Date 2012-07-19.18:55:28.244>
    created_at = <Date 2012-07-19.13:24:55.986>
    labels = ['performance']
    title = 'memory leak in PyModule_Create2'
    updated_at = <Date 2012-07-19.19:07:44.551>
    user = 'https://bugs.python.org/jll'

    bugs.python.org fields:

    activity = <Date 2012-07-19.19:07:44.551>
    actor = 'jcea'
    assignee = 'meador.inge'
    closed = True
    closed_date = <Date 2012-07-19.18:55:28.244>
    closer = 'meador.inge'
    components = []
    creation = <Date 2012-07-19.13:24:55.986>
    creator = 'jll'
    dependencies = []
    files = ['26435']
    hgrepos = []
    issue_num = 15394
    keywords = ['patch']
    message_count = 4.0
    messages = ['165838', '165843', '165853', '165854']
    nosy_count = 4.0
    nosy_names = ['jcea', 'meador.inge', 'python-dev', 'jll']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue15394'
    versions = ['Python 3.2', 'Python 3.3']

    @jll
    Copy link
    Mannequin Author

    jll mannequin commented Jul 19, 2012

    In objects/moduleobject.c, in the function PyModule_Create2, it appears that m should be decrefed on all of the failure paths between its allocation and the return from the function.

    @jll jll mannequin added the performance Performance or resource usage label Jul 19, 2012
    @meadori
    Copy link
    Member

    meadori commented Jul 19, 2012

    This looks OK to me (I don't see a way to write a test case to cover the leak). I will commit later today unless I hear some objections.

    @meadori meadori self-assigned this Jul 19, 2012
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 19, 2012

    New changeset 7140d97d36fd by Meador Inge in branch '3.2':
    Issue bpo-15394: Fix ref leaks in PyModule_Create.
    http://hg.python.org/cpython/rev/7140d97d36fd

    New changeset 571777bf5527 by Meador Inge in branch 'default':
    Issue bpo-15394: Fix ref leaks in PyModule_Create.
    http://hg.python.org/cpython/rev/571777bf5527

    @meadori
    Copy link
    Member

    meadori commented Jul 19, 2012

    Thanks for the patch Julia!

    @meadori meadori closed this as completed Jul 19, 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
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant