diff options
author | Christian Heimes <christian@python.org> | 2022-03-31 15:14:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 15:14:50 (GMT) |
commit | 44e915028d75f7cef141aa1aada962465a5907d6 (patch) | |
tree | 7413142bf87102c1d8113bb730ac8b929b989eeb /Objects | |
parent | 5458b7e39eb41b146c650b76e04ac67213138a82 (diff) | |
download | cpython-44e915028d75f7cef141aa1aada962465a5907d6.zip cpython-44e915028d75f7cef141aa1aada962465a5907d6.tar.gz cpython-44e915028d75f7cef141aa1aada962465a5907d6.tar.bz2 |
bpo-47182: Fix crash by named unicode characters after interpreter reinitialization (GH-32212)
Automerge-Triggered-By: GH:tiran
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 5a1d2c0..2d40963 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -16085,6 +16085,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); |