Author eric.snow
Recipients eric.snow, vstinner
Date 2019-05-10.19:01:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
We still have a bunch of "global" C variables (static globals, static locals, maybe thread-local storage) in our code-base that break the isolation between interpreters.  I added Tools/c-globals/ a while back to help identify such variables, however more have crept in.  I also did not take static locals or thread-locals into account.

To address the above, we should do the following:

1. update to identify static locals (and thread-locals)
2. deal with any identified globals
   * move them to _PyRuntimeState (or thread-locals to PyThreadState, etc.)
   * ignore them by adding them to Tools/c-globals/ignored-globals.txt
3. add to "make check"
4. (if "make check" isn't already there), ensure is run at some point in CI

Separately, we should move fields out of _PyRuntimeState into PyInterpreterState wherever possible.  That can also be done at step 2 if it's not too much work.
Date User Action Args
2019-05-10 19:01:42eric.snowsetrecipients: + eric.snow, vstinner
2019-05-10 19:01:42eric.snowsetmessageid: <>
2019-05-10 19:01:42eric.snowlinkissue36876 messages
2019-05-10 19:01:41eric.snowcreate