[Python-checkins] r74635 - python/trunk/Lib/test/crashers/slot_tp_new.py
armin.rigo
python-checkins at python.org
Thu Sep 3 21:40:08 CEST 2009
Author: armin.rigo
Date: Thu Sep 3 21:40:07 2009
New Revision: 74635
Log:
Found the next crasher by thinking about this logic in PyPy.
Added:
python/trunk/Lib/test/crashers/slot_tp_new.py (contents, props changed)
Added: python/trunk/Lib/test/crashers/slot_tp_new.py
==============================================================================
--- (empty file)
+++ python/trunk/Lib/test/crashers/slot_tp_new.py Thu Sep 3 21:40:07 2009
@@ -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()
More information about the Python-checkins
mailing list