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

va_end twice in PyUnicode_FromFormatV #72603

Closed
zhangyangyu opened this issue Oct 11, 2016 · 2 comments
Closed

va_end twice in PyUnicode_FromFormatV #72603

zhangyangyu opened this issue Oct 11, 2016 · 2 comments
Labels
3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@zhangyangyu
Copy link
Member

BPO 28417
Nosy @vstinner, @tiran, @serhiy-storchaka, @zhangyangyu
Files
  • PyUnicode_FromFormatV.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 2016-10-12.06:01:23.782>
    created_at = <Date 2016-10-11.16:19:38.485>
    labels = ['interpreter-core', 'type-bug', '3.7']
    title = 'va_end twice in PyUnicode_FromFormatV'
    updated_at = <Date 2016-10-12.06:01:23.757>
    user = 'https://github.com/zhangyangyu'

    bugs.python.org fields:

    activity = <Date 2016-10-12.06:01:23.757>
    actor = 'python-dev'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-10-12.06:01:23.782>
    closer = 'python-dev'
    components = ['Interpreter Core']
    creation = <Date 2016-10-11.16:19:38.485>
    creator = 'xiang.zhang'
    dependencies = []
    files = ['45059']
    hgrepos = []
    issue_num = 28417
    keywords = ['patch']
    message_count = 2.0
    messages = ['278496', '278517']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'christian.heimes', 'python-dev', 'serhiy.storchaka', 'xiang.zhang']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28417'
    versions = ['Python 3.6', 'Python 3.7']

    @zhangyangyu
    Copy link
    Member Author

    vargs2 could be va_end()ed twice in PyUnicode_FromFormatV when format contains non-ascii characters. Once va_end()ed, vargs2 is undefined. So this could lead to undefined behaviour.

    @zhangyangyu zhangyangyu added 3.7 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Oct 11, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 12, 2016

    New changeset 6a6ac890db78 by Benjamin Peterson in branch '3.6':
    va_end vargs2 once (closes bpo-28417)
    https://hg.python.org/cpython/rev/6a6ac890db78

    New changeset 439427ffbba1 by Benjamin Peterson in branch 'default':
    merge 3.6 (bpo-28417)
    https://hg.python.org/cpython/rev/439427ffbba1

    @python-dev python-dev mannequin closed this as completed Oct 12, 2016
    @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) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant