summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-05-25 21:13:33 +0900
committerGitHub <noreply@github.com>2019-05-25 21:13:33 +0900
commitea2b76bdc5f97f49701213d105b8ec2387ea2fa5 (patch)
tree4d4e79d68e72b9740590b09e32024c1592ec736f /Include
parentc70ab1cca0f43dbf3bad4acacd06a792cdbe03c8 (diff)
downloadcpython-git-ea2b76bdc5f97f49701213d105b8ec2387ea2fa5.tar.gz
bpo-27987: align PyGC_Head to alignof(long double) (GH-13335)
Diffstat (limited to 'Include')
-rw-r--r--Include/objimpl.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 057bb50cbd..0436ba7899 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -255,7 +255,11 @@ typedef union _gc_head {
union _gc_head *gc_prev;
Py_ssize_t gc_refs;
} gc;
- double dummy; /* force worst-case alignment */
+ long double dummy; /* force worst-case alignment */
+ // malloc returns memory block aligned for any built-in types and
+ // long double is the largest standard C type.
+ // On amd64 linux, long double requires 16 byte alignment.
+ // See bpo-27987 for more discussion.
} PyGC_Head;
extern PyGC_Head *_PyGC_generation0;