New submission from junyixie <xie.ju...@outlook.com>:

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);
```

----------
messages: 389950
nosy: JunyiXie
priority: normal
severity: normal
status: open
title: use unicode_state empty string before unicode_init. without define 
WITH_DOC_STRINGS
type: crash
versions: Python 3.10

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43687>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to