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.

Title: use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: JunyiXie, vstinner
Priority: normal Keywords: patch

Created on 2021-04-01 03:39 by JunyiXie, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25129 closed JunyiXie, 2021-04-01 03:41
PR 25147 merged vstinner, 2021-04-02 10:00
Messages (3)
msg389950 - (view) Author: junyixie (JunyiXie) * Date: 2021-04-01 03:39
use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS.

PyType_Ready call PyUnicode_FromString, if doc string striped, cause crash.

unicode_get_empty() must not be called before _PyUnicode_Init() or after _PyUnicode_Fini()

const char *old_doc = _PyType_DocWithoutSignature(type->tp_name,type->tp_doc);
PyObject *doc = PyUnicode_FromString(old_doc);
msg390060 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-02 13:28
New changeset 442ad74fc2928b095760eb89aba93c28eab17f9b by Victor Stinner in branch 'master':
bpo-43687: Py_Initialize() creates singletons earlier (GH-25147)
msg390061 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-02 13:29
It's now fixed, thanks for the bug report.
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87853
2021-04-02 13:29:23vstinnersetstatus: open -> closed
messages: + msg390061

components: + Interpreter Core
resolution: fixed
stage: patch review -> resolved
2021-04-02 13:28:19vstinnersetmessages: + msg390060
2021-04-02 10:00:43vstinnersetnosy: + vstinner
pull_requests: + pull_request23894
2021-04-01 03:41:08JunyiXiesetkeywords: + patch
stage: patch review
pull_requests: + pull_request23876
2021-04-01 03:39:21JunyiXiecreate