You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-40294: Use-after-free crash if multiple interpreters import asyncio module
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2020-04-28.02:30:45.940>created_at=<Date2020-04-28.02:27:25.057>labels= ['3.8', '3.9', 'expert-asyncio']
title='_asyncio extensions crashes if initialized multiple times in same process'updated_at=<Date2020-04-28.12:44:07.315>user='https://github.com/indygreg'
Most of CPython's extensions can be initialized and freed multiple times in the same process. However, _asyncio crashes on at least CPython 3.8.2 when this is done.
STR:
Create a new Python interpreter
Have it import _asyncio
Finalize that interpreter.
Create a new Python interpreter
Have it import _asyncio
There are probably STR in pure Python by forcing _imp.create_dynamic() to run multiple times after the module is unloaded.
The crash occurs due to unchecked NULL access in Py_INCREF(all_tasks); in PyInit__asyncio().
I think the underlying problem is module_init() is short-circuiting because module_initialized is set. And module_initialized is set on subsequent module loads because module_free() isn't clearing it.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: