aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_tasks.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2018-12-17 07:52:45 -0700
committerSerhiy Storchaka <storchaka@gmail.com>2018-12-17 16:52:45 +0200
commit842acaab1376c5c84fd5966bb6070e289880e1ca (patch)
treef21283245b7e349d05482b89fde8d570b33c53ab /Lib/test/test_asyncio/test_tasks.py
parent4db62e115891425db2a974142a72d8eaaf95eecb (diff)
downloadcpython-842acaab1376c5c84fd5966bb6070e289880e1ca.tar.gz
cpython-842acaab1376c5c84fd5966bb6070e289880e1ca.zip
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175)
Diffstat (limited to 'Lib/test/test_asyncio/test_tasks.py')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index c65d1f2440d..22f14f87624 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -2546,6 +2546,15 @@ class CTask_CFuture_Tests(BaseTaskTests, SetMethodsTest,
self.loop.run_until_complete(task)
self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
+ def test_del__log_destroy_pending_segfault(self):
+ @asyncio.coroutine
+ def coro():
+ pass
+ task = self.new_task(self.loop, coro())
+ self.loop.run_until_complete(task)
+ with self.assertRaises(AttributeError):
+ del task._log_destroy_pending
+
@unittest.skipUnless(hasattr(futures, '_CFuture') and
hasattr(tasks, '_CTask'),