summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-06-18 16:49:45 (GMT)
committerGuido van Rossum <guido@python.org>2002-06-18 16:49:45 (GMT)
commita96b0df624247660d7a5fc620d3e82af1d124de2 (patch)
tree6e520ea05e00b6f262179e0a2cd04a9db8143769
parent63517577fdcd7c17072e1a612f6d91a35030d571 (diff)
downloadcpython-a96b0df624247660d7a5fc620d3e82af1d124de2.zip
cpython-a96b0df624247660d7a5fc620d3e82af1d124de2.tar.gz
cpython-a96b0df624247660d7a5fc620d3e82af1d124de2.tar.bz2
Patch from SF bug 570483 (Tim Northover).
In a fresh interpreter, type.mro(tuple) would segfault, because PyType_Ready() isn't called for tuple yet. To fix, call PyType_Ready(type) if type->tp_dict is NULL.
-rw-r--r--Lib/test/test_descr.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 852115b..2129a7b 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3169,6 +3169,12 @@ def do_this_first():
except:
pass
+ if verbose:
+ print "Testing SF bug 570483..."
+ # Another segfault only when run early
+ # (before PyType_Ready(tuple) is called)
+ type.mro(tuple)
+
def test_main():
do_this_first()
class_docstrings()