From f41669049039a2035acb8647ae7604e27a6bf6c5 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Thu, 3 Sep 2009 19:40:07 +0000 Subject: Found the next crasher by thinking about this logic in PyPy. --- Lib/test/crashers/slot_tp_new.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Lib/test/crashers/slot_tp_new.py diff --git a/Lib/test/crashers/slot_tp_new.py b/Lib/test/crashers/slot_tp_new.py new file mode 100644 index 0000000..061d7aa --- /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() -- cgit v0.12