]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/borrowed_ref_1.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / crashers / borrowed_ref_1.py
CommitLineData
4710c53d 1"""\r
2_PyType_Lookup() returns a borrowed reference.\r
3This attacks the call in dictobject.c.\r
4"""\r
5\r
6class A(object):\r
7 pass\r
8\r
9class B(object):\r
10 def __del__(self):\r
11 print 'hi'\r
12 del D.__missing__\r
13\r
14class D(dict):\r
15 class __missing__:\r
16 def __init__(self, *args):\r
17 pass\r
18\r
19\r
20d = D()\r
21a = A()\r
22a.cycle = a\r
23a.other = B()\r
24del a\r
25\r
26prev = None\r
27while 1:\r
28 d[5]\r
29 prev = (prev,)\r