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

_PyCode_SetExtra behaviour wrong on allocation failure and after realloc #73869

Closed
brianfcoleman mannequin opened this issue Mar 1, 2017 · 6 comments
Closed

_PyCode_SetExtra behaviour wrong on allocation failure and after realloc #73869

brianfcoleman mannequin opened this issue Mar 1, 2017 · 6 comments
Assignees
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage

Comments

@brianfcoleman
Copy link
Mannequin

brianfcoleman mannequin commented Mar 1, 2017

BPO 29683
Nosy @vstinner, @serhiy-storchaka, @brianfcoleman
PRs
  • bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is allocated #376
  • [3.6] bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is allocated. #402
  • [Do Not Merge] Sample of CPython life with blurb. #703
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • 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 2017-03-03.05:35:28.233>
    created_at = <Date 2017-03-01.08:52:12.857>
    labels = ['interpreter-core', '3.7', 'performance']
    title = '_PyCode_SetExtra behaviour wrong on allocation failure and after realloc'
    updated_at = <Date 2017-03-31.16:36:12.804>
    user = 'https://github.com/brianfcoleman'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:12.804>
    actor = 'dstufft'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2017-03-03.05:35:28.233>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2017-03-01.08:52:12.857>
    creator = 'brianfcoleman'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 29683
    keywords = []
    message_count = 6.0
    messages = ['288745', '288747', '288833', '288858', '290341', '290348']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'serhiy.storchaka', 'brianfcoleman']
    pr_nums = ['376', '402', '703', '552']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue29683'
    versions = ['Python 3.6', 'Python 3.7']

    @brianfcoleman
    Copy link
    Mannequin Author

    brianfcoleman mannequin commented Mar 1, 2017

    On PyMem_Malloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0.
    On PyMem_Realloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0.
    On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in co_extra->ce_extras to NULL.

    I will add a GitHub PR for this shortly.

    @brianfcoleman brianfcoleman mannequin added 3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage labels Mar 1, 2017
    @brianfcoleman
    Copy link
    Mannequin Author

    brianfcoleman mannequin commented Mar 1, 2017

    I have now added a Github pull request here:
    #376

    @serhiy-storchaka serhiy-storchaka self-assigned this Mar 1, 2017
    @brianfcoleman
    Copy link
    Mannequin Author

    brianfcoleman mannequin commented Mar 2, 2017

    I have created a pull request to backport the fix onto 3.6 here:
    #402

    @serhiy-storchaka
    Copy link
    Member

    Thank you for your contribution Brian.

    @serhiy-storchaka
    Copy link
    Member

    New changeset a6e8493 by Serhiy Storchaka (Brian Coleman) in branch '3.6':
    bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is (#402)
    a6e8493

    @vstinner
    Copy link
    Member

    New changeset 6a9122c by Victor Stinner (Brian Coleman) in branch 'master':
    bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is (#376)
    6a9122c

    @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
    3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants