gh-132399: ensure correct alignment of PyInterpreterState (#132428)

This commit is contained in:
Bénédikt Tran 2025-04-19 11:03:06 +02:00 committed by GitHub
parent 8a9c6c4d16
commit 427e7fc099
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 3 deletions

View file

@ -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;