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

recursive __attribute__ -> Fatal Python error: Cannot recover from stack overflow. #51587

Closed
kaizhu mannequin opened this issue Nov 17, 2009 · 5 comments
Closed

recursive __attribute__ -> Fatal Python error: Cannot recover from stack overflow. #51587

kaizhu mannequin opened this issue Nov 17, 2009 · 5 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@kaizhu
Copy link
Mannequin

kaizhu mannequin commented Nov 17, 2009

BPO 7338
Nosy @loewis, @terryjreedy, @pitrou, @ezio-melotti, @serwy
Superseder
  • bpo-6028: Interpreter aborts when chaining an infinite number of exceptions
  • 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 2011-12-24.22:47:36.805>
    created_at = <Date 2009-11-17.11:01:32.836>
    labels = ['interpreter-core', 'type-bug']
    title = 'recursive __attribute__ -> Fatal Python error: Cannot recover from stack overflow.'
    updated_at = <Date 2011-12-24.22:47:36.804>
    user = 'https://bugs.python.org/kaizhu'

    bugs.python.org fields:

    activity = <Date 2011-12-24.22:47:36.804>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-12-24.22:47:36.805>
    closer = 'terry.reedy'
    components = ['Interpreter Core']
    creation = <Date 2009-11-17.11:01:32.836>
    creator = 'kaizhu'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 7338
    keywords = []
    message_count = 5.0
    messages = ['95381', '95382', '150233', '150236', '150239']
    nosy_count = 6.0
    nosy_names = ['loewis', 'terry.reedy', 'pitrou', 'ezio.melotti', 'roger.serwy', 'kaizhu']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '6028'
    type = 'behavior'
    url = 'https://bugs.python.org/issue7338'
    versions = ['Python 3.2', 'Python 3.3']

    @kaizhu
    Copy link
    Mannequin Author

    kaizhu mannequin commented Nov 17, 2009

    Python 3.1.1 (r311:74480, Sep 13 2009, 17:17:12)
    [GCC 4.3.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> class Foo(object):
    ...   def __getattribute__(self, attr):
    ...     try: return object.__getattribute__(attr)
    ...     except: return self.x
    ...
    >>> Foo().y
    Fatal Python error: Cannot recover from stack overflow.
    Aborted
    $

    python2.6 recovers from above w/ a RuntimeError

    @kaizhu kaizhu mannequin added type-crash A hard crash of the interpreter, possibly with a core dump interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Nov 17, 2009
    @pitrou
    Copy link
    Member

    pitrou commented Nov 17, 2009

    This is normal. By doing "except: return self.x", you are reinvoking
    __getattribute__ as soon as the RuntimeError is raised, and forcing the
    interpreter into another infinite recursion.

    @ezio-melotti
    Copy link
    Member

    This is normal.

    Can this be closed then?

    @serwy
    Copy link
    Mannequin

    serwy mannequin commented Dec 24, 2011

    This is related to bpo-13644.

    @terryjreedy
    Copy link
    Member

    This seems to be a duplicate of 3555 and 6028. I am redirecting to the latter because is has a proposed patch.

    @terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error and removed type-crash A hard crash of the interpreter, possibly with a core dump labels Dec 24, 2011
    @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-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants