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

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: Ok, the issue is now fixed: thanks Jeffrey Quesnelle! > Nope, this was introduced in 3.8 I tested: attached main.c doesn't crash in 3.7. I guess that _asyncio leaks a few references, but it's not a big deal. -- resolution: -> fixed stage: patch rev

[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 ___

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

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: Is Python 3.7 affected as well? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

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

2020-04-16 Thread miss-islington
miss-islington added the comment: New changeset 6b0ca0aeab04d7b7b54086248ca9d5e70f770f2f by Miss Islington (bot) in branch '3.8': bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542) https://github.com/python/cpython/commit/6b0ca0aeab04d7b7b54086248ca9d5e70f770f2f

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

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: > Would the simple fix (clearing the flag in `module_free`) be a candidate for > a backport to 3.8? Sure. -- ___ Python tracker ___ ___

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

2020-04-16 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +18907 pull_request: https://github.com/python/cpython/pull/19565 ___ Python tracker _

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

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: New changeset a75e730075cd25be1143e6183006f3b1d61bb80f by Jeffrey Quesnelle in branch 'master': bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542) https://github.com/python/cpython/commit/a75e730075cd25be1143e6183006f3b1d61bb80f

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

2020-04-16 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[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 li

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

2020-04-15 Thread STINNER Victor
STINNER Victor added the comment: _asyncio should be ported to multiphase initialization (PEP 489) and its types converted to PyType_FromSpec() rather than using statically allocated types. See bpo-1635741. -- nosy: +vstinner ___ Python tracker <

[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 __

[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, when t