summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2006-06-13 21:46:41 +0000
committerBrett Cannon <bcannon@gmail.com>2006-06-13 21:46:41 +0000
commitea3912b0da71e16b8a37e04fcf3969dc85c27fa1 (patch)
treec620923df225897ffdd560e09ecd99efd692c586 /Lib/test
parent64116f931cbc517f16f3557c2c776b0f835b6384 (diff)
downloadcpython-git-ea3912b0da71e16b8a37e04fcf3969dc85c27fa1.tar.gz
If a classic class defined a __coerce__() method that just returned its two
arguments in reverse, the interpreter would infinitely recourse trying to get a coercion that worked. So put in a recursion check after a coercion is made and the next call to attempt to use the coerced values. Fixes bug #992017 and closes crashers/coerce.py .
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/crashers/coerce.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/Lib/test/crashers/coerce.py b/Lib/test/crashers/coerce.py
deleted file mode 100644
index 574956b228..0000000000
--- a/Lib/test/crashers/coerce.py
+++ /dev/null
@@ -1,9 +0,0 @@
-
-# http://python.org/sf/992017
-
-class foo:
- def __coerce__(self, other):
- return other, self
-
-if __name__ == '__main__':
- foo()+1 # segfault: infinite recursion in C