Two critical bugs in the import system:
- import_run_extension (line 2189): After switching to main interpreter,
_PyUnicode_Copyfailure doesreturn NULLinstead ofgoto main_finally. Code resumes on wrong interpreter → crashes/corruption. - _PyImport_LoadLazyImportTstate (line 3931):
_PyImport_ReleaseLockcalled beforegoto error, then error path releases again →Py_FatalError("unlocking a recursive mutex not owned by current thread").
- Change
return NULLat line 2189 torc = -1; goto main_finally;. - Remove
_PyImport_ReleaseLock(interp)at line 3931.