|
21 | 21 | '_Py_HashSecret_Initialized': 'process-global', |
22 | 22 | '_TARGET_LOCALES': 'process-global', |
23 | 23 |
|
24 | | - # startup |
| 24 | + # startup (only changed before/during) |
| 25 | + '_PyRuntime': 'runtime startup', |
25 | 26 | 'runtime_initialized': 'runtime startup', |
26 | 27 | 'static_arg_parsers': 'runtime startup', |
27 | 28 | 'orig_argv': 'runtime startup', |
28 | 29 | 'opt_ptr': 'runtime startup', |
29 | 30 | '_preinit_warnoptions': 'runtime startup', |
30 | 31 | '_Py_StandardStreamEncoding': 'runtime startup', |
| 32 | + 'Py_FileSystemDefaultEncoding': 'runtime startup', |
31 | 33 | '_Py_StandardStreamErrors': 'runtime startup', |
32 | | - |
33 | | - # should be const |
| 34 | + 'Py_FileSystemDefaultEncodeErrors': 'runtime startup', |
| 35 | + 'Py_BytesWarningFlag': 'runtime startup', |
| 36 | + 'Py_DebugFlag': 'runtime startup', |
| 37 | + 'Py_DontWriteBytecodeFlag': 'runtime startup', |
| 38 | + 'Py_FrozenFlag': 'runtime startup', |
| 39 | + 'Py_HashRandomizationFlag': 'runtime startup', |
| 40 | + 'Py_IgnoreEnvironmentFlag': 'runtime startup', |
| 41 | + 'Py_InspectFlag': 'runtime startup', |
| 42 | + 'Py_InteractiveFlag': 'runtime startup', |
| 43 | + 'Py_IsolatedFlag': 'runtime startup', |
| 44 | + 'Py_NoSiteFlag': 'runtime startup', |
| 45 | + 'Py_NoUserSiteDirectory': 'runtime startup', |
| 46 | + 'Py_OptimizeFlag': 'runtime startup', |
| 47 | + 'Py_QuietFlag': 'runtime startup', |
| 48 | + 'Py_UTF8Mode': 'runtime startup', |
| 49 | + 'Py_UnbufferedStdioFlag': 'runtime startup', |
| 50 | + 'Py_VerboseFlag': 'runtime startup', |
| 51 | + '_Py_path_config': 'runtime startup', |
| 52 | + '_PyOS_optarg': 'runtime startup', |
| 53 | + '_PyOS_opterr': 'runtime startup', |
| 54 | + '_PyOS_optind': 'runtime startup', |
| 55 | + '_Py_HashSecret': 'runtime startup', |
| 56 | + |
| 57 | + # effectively const |
34 | 58 | 'tracemalloc_empty_traceback': 'const', |
35 | 59 | '_empty_bitmap_node': 'const', |
36 | 60 | 'posix_constants_pathconf': 'const', |
37 | 61 | 'posix_constants_confstr': 'const', |
38 | 62 | 'posix_constants_sysconf': 'const', |
| 63 | + '_PySys_ImplCacheTag': 'const', |
| 64 | + '_PySys_ImplName': 'const', |
| 65 | + 'PyImport_Inittab': 'const', |
| 66 | + '_PyImport_DynLoadFiletab': 'const', |
| 67 | + '_PyParser_Grammar': 'const', |
| 68 | + 'Py_hexdigits': 'const', |
| 69 | + '_PyImport_Inittab': 'const', |
| 70 | + '_PyByteArray_empty_string': 'const', |
| 71 | + '_PyLong_DigitValue': 'const', |
| 72 | + '_Py_SwappedOp': 'const', |
| 73 | + 'PyStructSequence_UnnamedField': 'const', |
39 | 74 |
|
40 | 75 | # signals are main-thread only |
41 | 76 | 'faulthandler_handlers': 'signals are main-thread only', |
42 | 77 | 'user_signals': 'signals are main-thread only', |
| 78 | + 'wakeup': 'signals are main-thread only', |
43 | 79 | } |
44 | 80 |
|
45 | 81 | BENIGN = 'races here are benign and unlikely' |
@@ -109,6 +145,8 @@ def _is_ignored(variable, ignoredvars=None, *, |
109 | 145 | return BENIGN |
110 | 146 | if variable.name == 'ioctl_works': |
111 | 147 | return BENIGN |
| 148 | + if variable.name == '_Py_open_cloexec_works': |
| 149 | + return BENIGN |
112 | 150 | if variable.filename == 'Python/codecs.c': |
113 | 151 | if variable.name == 'ucnhash_CAPI': |
114 | 152 | return BENIGN |
@@ -150,6 +188,8 @@ def _is_vartype_okay(vartype, ignoredtypes=None): |
150 | 188 |
|
151 | 189 | if vartype.startswith('static const '): |
152 | 190 | return 'const' |
| 191 | + if vartype.startswith('const '): |
| 192 | + return 'const' |
153 | 193 |
|
154 | 194 | # components for TypeObject definitions |
155 | 195 | for name in ('PyMethodDef', 'PyGetSetDef', 'PyMemberDef'): |
|
0 commit comments