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

Crash after modifying f_lineno #58817

Closed
mtomassoli mannequin opened this issue Apr 18, 2012 · 4 comments
Closed

Crash after modifying f_lineno #58817

mtomassoli mannequin opened this issue Apr 18, 2012 · 4 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@mtomassoli
Copy link
Mannequin

mtomassoli mannequin commented Apr 18, 2012

BPO 14612
Nosy @birkenfeld, @benjaminp, @bitdancer
Files
  • script.py
  • frame_setlineno.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/benjaminp'
    closed_at = <Date 2012-04-18.15:24:40.905>
    created_at = <Date 2012-04-18.11:20:31.706>
    labels = ['interpreter-core', 'type-crash']
    title = 'Crash after modifying f_lineno'
    updated_at = <Date 2012-04-18.15:24:40.903>
    user = 'https://bugs.python.org/mtomassoli'

    bugs.python.org fields:

    activity = <Date 2012-04-18.15:24:40.903>
    actor = 'python-dev'
    assignee = 'benjamin.peterson'
    closed = True
    closed_date = <Date 2012-04-18.15:24:40.905>
    closer = 'python-dev'
    components = ['Interpreter Core']
    creation = <Date 2012-04-18.11:20:31.706>
    creator = 'mtomassoli'
    dependencies = []
    files = ['25256', '25258']
    hgrepos = []
    issue_num = 14612
    keywords = ['patch']
    message_count = 4.0
    messages = ['158603', '158613', '158619', '158634']
    nosy_count = 6.0
    nosy_names = ['georg.brandl', 'peter.otten', 'benjamin.peterson', 'r.david.murray', 'python-dev', 'mtomassoli']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue14612'
    versions = ['Python 2.7', 'Python 3.3']

    @mtomassoli
    Copy link
    Mannequin Author

    mtomassoli mannequin commented Apr 18, 2012

    Debugging script.py and jumping to line 3 makes Python crash.
    For instance:

    python -m pdb script.py
    (Pdb) j 3

    @mtomassoli mtomassoli mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump labels Apr 18, 2012
    @bitdancer
    Copy link
    Member

    For reference, here is the crash:

    rdmurray@hey:~/python/p33>./python -m pdb script.py

    /home/rdmurray/python/p33/script.py(1)<module>()
    -> with open('test') as f:
    (Pdb) j 3
    python: Objects/frameobject.c:207: frame_setlineno: Assertion `blockstack_top > 0' failed.
    zsh: abort ./python -m pdb script.py

    @benjaminp benjaminp self-assigned this Apr 18, 2012
    @peterotten
    Copy link
    Mannequin

    peterotten mannequin commented Apr 18, 2012

    frame_setlineno() doesn't keep track of with blocks. Here's a patch.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 18, 2012

    New changeset 6a0a073e8461 by Benjamin Peterson in branch '3.2':
    SETUP_WITH acts like SETUP_FINALLY for the purposes of setting f_lineno (closes bpo-14612)
    http://hg.python.org/cpython/rev/6a0a073e8461

    New changeset 0695f5d028a7 by Benjamin Peterson in branch 'default':
    merge 3.2 (bpo-14612)
    http://hg.python.org/cpython/rev/0695f5d028a7

    New changeset 67be12ab8948 by Benjamin Peterson in branch '2.7':
    SETUP_WITH acts like SETUP_FINALLY for the purposes of setting f_lineno (closes bpo-14612)
    http://hg.python.org/cpython/rev/67be12ab8948

    @python-dev python-dev mannequin closed this as completed Apr 18, 2012
    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants