Propagate errors (however unlikely) from _Py_Deepfreeze_Init() (GH-31596)

This commit is contained in:
Kumar Aditya 2022-02-26 22:05:03 +05:30 committed by GitHub
parent edbee56d69
commit 0d9b565e62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 13 deletions

View file

@ -828,7 +828,9 @@ pycore_interp_init(PyThreadState *tstate)
}
// Intern strings in deep-frozen modules first so that others
// can use it instead of creating a heap allocated string.
_Py_Deepfreeze_Init();
if (_Py_Deepfreeze_Init() < 0) {
return _PyStatus_ERR("failed to initialize deep-frozen modules");
}
status = pycore_init_types(interp);
if (_PyStatus_EXCEPTION(status)) {