-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
topic-asynciotype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Crash report
The following code crashes the interpreter by reading into freed memory.
import asyncio
class MyTask(asyncio.Task):
def __del__(self):
print("MyTask.__del__")
async def main():
task = MyTask(asyncio.sleep(1))
await task
asyncio.run(main())
Output:
✦ ❯ ./python main.py
MyTask.__del__
fish: Job 2, './python main.py' terminated by signal SIGSEGV (Address boundary error)
Supporting subclasses seems tricky with it, I propose to use fast implementation only with exact types.
Linked PRs
Metadata
Metadata
Assignees
Labels
topic-asynciotype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Projects
Status
Done