]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/borrowed_ref_2.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / crashers / borrowed_ref_2.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/borrowed_ref_2.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/test/crashers/borrowed_ref_2.py
deleted file mode 100644 (file)
index fea33f8..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-"""\r
-_PyType_Lookup() returns a borrowed reference.\r
-This attacks PyObject_GenericSetAttr().\r
-\r
-NB. on my machine this crashes in 2.5 debug but not release.\r
-"""\r
-\r
-class A(object):\r
-    pass\r
-\r
-class B(object):\r
-    def __del__(self):\r
-        print "hi"\r
-        del C.d\r
-\r
-class D(object):\r
-    def __set__(self, obj, value):\r
-        self.hello = 42\r
-\r
-class C(object):\r
-    d = D()\r
-\r
-    def g():\r
-        pass\r
-\r
-\r
-c = C()\r
-a = A()\r
-a.cycle = a\r
-a.other = B()\r
-\r
-lst = [None] * 1000000\r
-i = 0\r
-del a\r
-while 1:\r
-    c.d = 42         # segfaults in PyMethod_New(im_func=D.__set__, im_self=d)\r
-    lst[i] = c.g     # consume the free list of instancemethod objects\r
-    i += 1\r