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

Reference leaks in test_curses #69931

Closed
serhiy-storchaka opened this issue Nov 27, 2015 · 5 comments
Closed

Reference leaks in test_curses #69931

serhiy-storchaka opened this issue Nov 27, 2015 · 5 comments
Assignees
Labels
extension-modules C modules in the Modules dir performance Performance or resource usage tests Tests in the Lib/test dir

Comments

@serhiy-storchaka
Copy link
Member

BPO 25745
Nosy @Yhg1s, @berkerpeksag, @serhiy-storchaka
Files
  • curses_panel_dealloc_userptr.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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2016-05-08.21:15:22.559>
    created_at = <Date 2015-11-27.18:04:42.039>
    labels = ['extension-modules', 'tests', 'performance']
    title = 'Reference leaks in test_curses'
    updated_at = <Date 2016-05-08.21:15:22.558>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2016-05-08.21:15:22.558>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2016-05-08.21:15:22.559>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules', 'Tests']
    creation = <Date 2015-11-27.18:04:42.039>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = ['42754']
    hgrepos = []
    issue_num = 25745
    keywords = ['patch']
    message_count = 5.0
    messages = ['255470', '264964', '264967', '264970', '265169']
    nosy_count = 4.0
    nosy_names = ['twouters', 'python-dev', 'berker.peksag', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue25745'
    versions = ['Python 3.5', 'Python 3.6']

    @serhiy-storchaka
    Copy link
    Member Author

    $ ./python -m test.regrtest -uall -R 3:3 test_curses
    [1/1] test_curses
    beginning 6 repetitions
    123456
    .
    test_curses leaked [2, 2, 2] references, sum=6
    test_curses leaked [0, 1, 2] memory blocks, sum=3
    1 test failed:
        test_curses

    @serhiy-storchaka serhiy-storchaka added extension-modules C modules in the Modules dir tests Tests in the Lib/test dir performance Performance or resource usage labels Nov 27, 2015
    @berkerpeksag
    Copy link
    Member

    In case someone wants to work on this, the suspicious tests are test_userptr_memory_leak and test_userptr_segfault. See also bpo-18113.

    @serhiy-storchaka
    Copy link
    Member Author

    Thank you for the tip Berker. Now I see how to fix the leak.

    @serhiy-storchaka serhiy-storchaka self-assigned this May 6, 2016
    @serhiy-storchaka
    Copy link
    Member Author

    Here is simple patch that fixes a leak.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 8, 2016

    New changeset afed12943ddd by Serhiy Storchaka in branch '3.5':
    Issue bpo-25745: Fixed leaking a userptr in curses panel destructor.
    https://hg.python.org/cpython/rev/afed12943ddd

    New changeset 1662b41e1663 by Serhiy Storchaka in branch '2.7':
    Issue bpo-25745: Fixed leaking a userptr in curses panel destructor.
    https://hg.python.org/cpython/rev/1662b41e1663

    New changeset 50a94e1cabe0 by Serhiy Storchaka in branch 'default':
    Issue bpo-25745: Fixed leaking a userptr in curses panel destructor.
    https://hg.python.org/cpython/rev/50a94e1cabe0

    @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
    extension-modules C modules in the Modules dir performance Performance or resource usage tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants