From: Benjamin Peterson Date: Tue, 25 Jan 2011 00:00:28 +0000 (+0000) Subject: another pretty crasher served up by pypy X-Git-Tag: v3.2rc2~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d454249a368f3498c643c1fe4c2dedffe0be3df0;p=thirdparty%2FPython%2Fcpython.git another pretty crasher served up by pypy --- diff --git a/Lib/test/crashers/underlying_dict.py b/Lib/test/crashers/underlying_dict.py new file mode 100644 index 000000000000..a4b799374381 --- /dev/null +++ b/Lib/test/crashers/underlying_dict.py @@ -0,0 +1,20 @@ +import gc + +thingy = object() +class A(object): + def f(self): + return 1 + x = thingy + +r = gc.get_referrers(thingy) +if "__module__" in r[0]: + dct = r[0] +else: + dct = r[1] + +a = A() +for i in range(10): + a.f() +dct["f"] = lambda self: 2 + +print(a.f()) # should print 1