diff options
author | Bénédikt Tran <10796600+picnixz@users.noreply.github.com> | 2025-04-19 11:03:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-19 11:03:06 +0200 |
commit | 427e7fc099e61d9a3d1f04e2fbde8b749e5fcf0a (patch) | |
tree | c442f5544d284e79aee0d72c037d337068f92121 /Include | |
parent | 8a9c6c4d16a746eea1e000d6701d1c274c1f331b (diff) | |
download | cpython-427e7fc099e61d9a3d1f04e2fbde8b749e5fcf0a.tar.gz cpython-427e7fc099e61d9a3d1f04e2fbde8b749e5fcf0a.zip |
gh-132399: ensure correct alignment of `PyInterpreterState` (#132428)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_interp_structs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/internal/pycore_interp_structs.h b/Include/internal/pycore_interp_structs.h index 573b56a57e1..9ac4b4630ab 100644 --- a/Include/internal/pycore_interp_structs.h +++ b/Include/internal/pycore_interp_structs.h @@ -754,6 +754,12 @@ struct _is { * and should be placed at the beginning. */ struct _ceval_state ceval; + /* 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. + */ + void *_malloced; + PyInterpreterState *next; int64_t id; |