[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-15 Thread Jeffrey Quesnelle
New submission from Jeffrey Quesnelle : Starting with Python 3.8 (GH-16598), the `_asyncio` module's C initialization is guarded behind a static variable. If the module is initialized a second time and this variable is set, the resources from the first initialization are used. However,

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-15 Thread Jeffrey Quesnelle
Change by Jeffrey Quesnelle : -- keywords: +patch pull_requests: +18890 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19542 ___ Python tracker <https://bugs.python.org/issu

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread Jeffrey Quesnelle
Jeffrey Quesnelle added the comment: Would the simple fix (clearing the flag in `module_free`) be a candidate for a backport to 3.8? This seems to be a regression from the previous stable version that also limits the usability of subinterpreters -- `asyncio` is loaded by a wide variety of

[issue40294] Use-after-free crash if multiple interpreters import asyncio module

2020-04-16 Thread Jeffrey Quesnelle
Jeffrey Quesnelle added the comment: > Is Python 3.7 affected as well? Nope, this was introduced in 3.8 -- ___ Python tracker <https://bugs.python.org/issu