[ python-Bugs-1590036 ] __getattr__ = getattr crash

SourceForge.net noreply at sourceforge.net
Sat Nov 4 20:40:19 CET 2006


Bugs item #1590036, was opened at 2006-11-03 08:44
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1590036&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
>Group: Python 2.5
Status: Open
Resolution: None
>Priority: 6
Private: No
Submitted By: Brian Harring (ferringb)
>Assigned to: Armin Rigo (arigo)
Summary: __getattr__ = getattr crash

Initial Comment:
class c(object):__getattr__ = getattr
c().spam

<segfault from overflowing the c stack>

Now granted... it's retarded to attempt this.  But out
of curiousity, I decided to be the retard, and noticed
the interpreter crashes instead of triggering a
RuntimeError for recursion.

As far as I know, getattr is instrumented with
Py_EnterRecursiveCall and Py_LEaveRecursiveCall... so a
bit curious as to how it's occuring.

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-11-04 11:40

Message:
Logged In: YES 
user_id=33168

The attached patch fixes this problem.  However, I'm
concerned there are more places like this.  I hope Armin has
some ideas if more things are needed to fix this problem.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1590036&group_id=5470


More information about the Python-bugs-list mailing list