This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients M-Reimer, bsteffensmeier, corona10, eric.snow, erlendaasland, graysky, hroncok, miss-islington, ndjensen, petr.viktorin, shihai1991, uckelman, vstinner
Date 2022-01-07.17:45:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641577500.22.0.922384349932.issue46070@roundup.psfhosted.org>
In-reply-to
Content
In the 3.9 branch, the commit 4d2cfd354969590ba8e0af0447fd84f8b5e61952 fixed the _asyncio extension. win_py399_crash_reproducer.py still branch on Windows in the 3.9 branch. The code can be simplified with:

    code = "import _sre"

Moreover, even if I modify PyInit__sre() to only call PyModule_Create(), it does still crash. I can still reproduce the crash with the following simplified _sre.c code:
---
static PyMethodDef _functions[] = {
    _SRE_COMPILE_METHODDEF
    {NULL, NULL}
};

static struct PyModuleDef sremodule = {
        PyModuleDef_HEAD_INIT,
        "_" SRE_MODULE,
        NULL,
        -1,
        _functions,
        NULL,
        NULL,
        NULL,
        NULL
};

PyMODINIT_FUNC PyInit__sre(void)
{
    return PyModule_Create(&sremodule);
}
---

If _SRE_COMPILE_METHODDEF is removd from _functions, the script no longer crash.

Is there something specific about method objects? Is it safe to share them between multiple interpreters? See my message msg408662 which gives some details.
History
Date User Action Args
2022-01-07 17:45:00vstinnersetrecipients: + vstinner, petr.viktorin, eric.snow, ndjensen, hroncok, uckelman, corona10, miss-islington, shihai1991, erlendaasland, graysky, bsteffensmeier, M-Reimer
2022-01-07 17:45:00vstinnersetmessageid: <1641577500.22.0.922384349932.issue46070@roundup.psfhosted.org>
2022-01-07 17:45:00vstinnerlinkissue46070 messages
2022-01-07 17:45:00vstinnercreate