From: Guido van Rossum Date: Tue, 18 Jun 2002 16:49:45 +0000 (+0000) Subject: Patch from SF bug 570483 (Tim Northover). X-Git-Tag: v2.3c1~5280 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a96b0df624247660d7a5fc620d3e82af1d124de2;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 852115be2164..2129a7b7c812 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()