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

PyNode_New() does not initialize n->n_col_offset #84682

Closed
TomaszPytel mannequin opened this issue May 4, 2020 · 2 comments
Closed

PyNode_New() does not initialize n->n_col_offset #84682

TomaszPytel mannequin opened this issue May 4, 2020 · 2 comments
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@TomaszPytel
Copy link
Mannequin

TomaszPytel mannequin commented May 4, 2020

BPO 40502
Nosy @nanjekyejoannah
PRs
  • bpo-40502: Initialize n->n_col_offset #19988
  • 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 2020-05-08.21:01:31.450>
    created_at = <Date 2020-05-04.18:26:58.199>
    labels = ['interpreter-core', '3.9']
    title = 'PyNode_New() does not initialize n->n_col_offset'
    updated_at = <Date 2020-05-08.21:01:31.449>
    user = 'https://bugs.python.org/TomaszPytel'

    bugs.python.org fields:

    activity = <Date 2020-05-08.21:01:31.449>
    actor = 'nanjekyejoannah'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-08.21:01:31.450>
    closer = 'nanjekyejoannah'
    components = ['Interpreter Core']
    creation = <Date 2020-05-04.18:26:58.199>
    creator = 'Tomasz Pytel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40502
    keywords = ['patch']
    message_count = 2.0
    messages = ['368074', '368464']
    nosy_count = 2.0
    nosy_names = ['nanjekyejoannah', 'Tomasz Pytel']
    pr_nums = ['19988']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40502'
    versions = ['Python 3.9']

    @TomaszPytel
    Copy link
    Mannequin Author

    TomaszPytel mannequin commented May 4, 2020

    I found this by accident by compiling empty strings since I use column information from the AST tree, if not initialized I get a starting column of -842150451. The easy fix is to initialize n->n_col_offset = 0; in Parser/node.c:PyNode_New().

    @TomaszPytel TomaszPytel mannequin added 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels May 4, 2020
    @nanjekyejoannah
    Copy link
    Member

    New changeset d10091a by Joannah Nanjekye in branch 'master':
    bpo-40502: Initialize n->n_col_offset (GH-19988)
    d10091a

    @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.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant