Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-105699: Fix a Crasher Related to a Deprecated Global Variable (
pythongh-106923) There was a slight race in _Py_ClearFileSystemEncoding() (when called from _Py_SetFileSystemEncoding()), between freeing the value and setting the variable to NULL, which occasionally caused crashes when multiple isolated interpreters were used. (Notably, I saw at least 10 different, seemingly unrelated spooky-action-at-a-distance, ways this crashed. Yay, free threading!) We avoid the problem by only setting the global variables with the main interpreter (i.e. runtime init).
- Loading branch information