aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/internal/pycore_interp_structs.h
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2025-04-20 08:23:00 +0200
committerGitHub <noreply@github.com>2025-04-20 11:53:00 +0530
commit246ed23456658f82854d518ad66d52652f992591 (patch)
tree528d27c57e8625935ea4e45c1798ebd4b04a728e /Include/internal/pycore_interp_structs.h
parenta16586c9e7a9accfe26489191b5b1ee39657ee5b (diff)
downloadcpython-246ed23456658f82854d518ad66d52652f992591.tar.gz
cpython-246ed23456658f82854d518ad66d52652f992591.zip
gh-127117: ensure that `_initial_thread` is the last field of `PyInterpreterState` when `Py_STACKREF_DEBUG` is defined (#132721)
Diffstat (limited to 'Include/internal/pycore_interp_structs.h')
-rw-r--r--Include/internal/pycore_interp_structs.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Include/internal/pycore_interp_structs.h b/Include/internal/pycore_interp_structs.h
index 9ac4b4630ab..af6ee3ab489 100644
--- a/Include/internal/pycore_interp_structs.h
+++ b/Include/internal/pycore_interp_structs.h
@@ -754,7 +754,7 @@ struct _is {
* and should be placed at the beginning. */
struct _ceval_state ceval;
- /* This structure is carefully allocated so that it's correctly aligned
+ /* This structure is carefully allocated so that it's correctly aligned
* to avoid undefined behaviors during LOAD and STORE. The '_malloced'
* field stores the allocated pointer address that will later be freed.
*/
@@ -941,11 +941,6 @@ struct _is {
Py_ssize_t _interactive_src_count;
- /* the initial PyInterpreterState.threads.head */
- _PyThreadStateImpl _initial_thread;
- // _initial_thread should be the last field of PyInterpreterState.
- // See https://github.com/python/cpython/issues/127117.
-
#if !defined(Py_GIL_DISABLED) && defined(Py_STACKREF_DEBUG)
uint64_t next_stackref;
_Py_hashtable_t *open_stackrefs_table;
@@ -953,6 +948,11 @@ struct _is {
_Py_hashtable_t *closed_stackrefs_table;
# endif
#endif
+
+ /* the initial PyInterpreterState.threads.head */
+ _PyThreadStateImpl _initial_thread;
+ // _initial_thread should be the last field of PyInterpreterState.
+ // See https://github.com/python/cpython/issues/127117.
};