mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175)
This commit is contained in:
parent
4db62e1158
commit
842acaab13
15 changed files with 81 additions and 4 deletions
|
@ -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'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue