From: Armin Rigo Date: Thu, 3 Sep 2009 19:40:07 +0000 (+0000) Subject: Found the next crasher by thinking about this logic in PyPy. X-Git-Tag: v2.7a1~594 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f41669049039a2035acb8647ae7604e27a6bf6c5;p=python Found the next crasher by thinking about this logic in PyPy. --- diff --git a/Lib/test/crashers/slot_tp_new.py b/Lib/test/crashers/slot_tp_new.py new file mode 100644 index 0000000000..061d7aac9f --- /dev/null +++ b/Lib/test/crashers/slot_tp_new.py @@ -0,0 +1,11 @@ +""" +Infinite C recursion involving PyObject_GetAttr in slot_tp_new. +""" + +class X(object): + class __metaclass__(type): + pass + __new__ = 5 + +X.__metaclass__.__new__ = property(X) +print X()