]> granicus.if.org Git - python/commitdiff
Found the next crasher by thinking about this logic in PyPy.
authorArmin Rigo <arigo@tunes.org>
Thu, 3 Sep 2009 19:40:07 +0000 (19:40 +0000)
committerArmin Rigo <arigo@tunes.org>
Thu, 3 Sep 2009 19:40:07 +0000 (19:40 +0000)
Lib/test/crashers/slot_tp_new.py [new file with mode: 0644]

diff --git a/Lib/test/crashers/slot_tp_new.py b/Lib/test/crashers/slot_tp_new.py
new file mode 100644 (file)
index 0000000..061d7aa
--- /dev/null
@@ -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()