diff options
author | Christian Heimes <christian@python.org> | 2022-04-01 08:44:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 08:44:56 (GMT) |
commit | 55d5c96c57738766eb6f3b5ccfa6599d5f094c18 (patch) | |
tree | 4fb9a1027db30ea8e4bbebc8bb5c3a91b2ea7a7e /Objects | |
parent | 9ed179b07df6ce7432f972f5d069a7c8dee56e79 (diff) | |
download | cpython-55d5c96c57738766eb6f3b5ccfa6599d5f094c18.zip cpython-55d5c96c57738766eb6f3b5ccfa6599d5f094c18.tar.gz cpython-55d5c96c57738766eb6f3b5ccfa6599d5f094c18.tar.bz2 |
[3.10] bpo-47182: Fix crash by named unicode characters after interpreter reinitialization (GH-32212) (GH-32216)
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 077cf8d..377fa6c 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -16352,6 +16352,9 @@ _PyUnicode_Fini(PyInterpreterState *interp) if (_Py_IsMainInterpreter(interp)) { // _PyUnicode_ClearInterned() must be called before _PyUnicode_Fini() assert(interned == NULL); + // bpo-47182: force a unicodedata CAPI capsule re-import on + // subsequent initialization of main interpreter. + ucnhash_capi = NULL; } _PyUnicode_FiniEncodings(&state->fs_codec); |