Issue 43687: use unicode_state empty string before unicode_init. without define WITH_DOC_STRINGS (original) (raw)

Issue43687

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() PyType_Ready ``` 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) https://github.com/python/cpython/commit/442ad74fc2928b095760eb89aba93c28eab17f9b
msg390061 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-02 13:29
It's now fixed, thanks for the bug report.
History
Date User Action Args
2022-04-11 14:59:43 admin set github: 87853
2021-04-02 13:29:23 vstinner set status: open -> closedmessages: + components: + Interpreter Coreresolution: fixedstage: patch review -> resolved
2021-04-02 13:28:19 vstinner set messages: +
2021-04-02 10:00:43 vstinner set nosy: + vstinnerpull_requests: + <pull%5Frequest23894>
2021-04-01 03:41:08 JunyiXie set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest23876>
2021-04-01 03:39:21 JunyiXie create