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

_lsprof: clear() should call flush_unmatched() #48202

Closed
vstinner opened this issue Sep 24, 2008 · 2 comments
Closed

_lsprof: clear() should call flush_unmatched() #48202

vstinner opened this issue Sep 24, 2008 · 2 comments

Comments

@vstinner
Copy link
Member

BPO 3952
Nosy @vstinner
Files
  • _lsprof_clear.patch: profiler_clear() calls flush_unmatched()
  • 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 2008-12-11.23:13:52.428>
    created_at = <Date 2008-09-24.01:22:08.042>
    labels = []
    title = '_lsprof: clear() should call flush_unmatched()'
    updated_at = <Date 2008-12-11.23:13:52.427>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2008-12-11.23:13:52.427>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-12-11.23:13:52.428>
    closer = 'vstinner'
    components = []
    creation = <Date 2008-09-24.01:22:08.042>
    creator = 'vstinner'
    dependencies = []
    files = ['11586']
    hgrepos = []
    issue_num = 3952
    keywords = ['patch']
    message_count = 2.0
    messages = ['73689', '77640']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue3952'
    versions = ['Python 2.6', 'Python 3.0']

    @vstinner
    Copy link
    Member Author

    Example to reproduce the bug (using Python trunk):
    ---

    from gc import collect
    import _lsprof
    
    def callMethod(obj):
        obj.clear()
        collect()
    
    obj = _lsprof.Profiler()
    obj.enable()
    callMethod(obj)
    obj.enable()

    del obj
    collect()
    ---

    The problem is that the profiler is still running when exiting
    callMethod() and so it tries to use callMethod context which was
    free'd just before by profiler_clear().

    @vstinner
    Copy link
    Member Author

    I'm unable to reproduce my issue with Python trunk, so close it.

    @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
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant