summaryrefslogtreecommitdiffstats
path: root/external/python3
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-10-27 10:06:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-10-27 10:12:47 +0100
commit67466a19752d73540e13697b91ca58429f6a64ac (patch)
tree4805c09af2703c57b96c07ba7f3d9c4bced6511d /external/python3
parentloplugin:unusedmethods (diff)
downloadcore-67466a19752d73540e13697b91ca58429f6a64ac.tar.gz
core-67466a19752d73540e13697b91ca58429f6a64ac.zip
Fix Python 3.5 sizeof(PyGC_Head) for UBSan
...by again using 'long double' instead of 'double' to "force worst-case alignment," just like Python 3.3 used to do. This fixes -fsanitize=alignment failures like > workdir/UnpackedTarball/python3/Modules/_ctypes/_ctypes.c:2923:10: runtime error: member access within misaligned address 0x6110007af498 for type 'CDataObject' (aka 'struct tagCDataObject'), which requires 16 byte alignment > 0x6110007af498: note: pointer points here > ff ff ff ff 01 00 00 00 00 00 00 00 98 98 17 00 90 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > ^ > GenericPyCData_new workdir/UnpackedTarball/python3/Modules/_ctypes/_ctypes.c:2923:10 > PyCFuncPtr_new workdir/UnpackedTarball/python3/Modules/_ctypes/_ctypes.c:3385:29 > type_call workdir/UnpackedTarball/python3/Objects/typeobject.c:908:11 > [...] during PythonTest_dbaccess_python. Change-Id: I8cc65823e1bc65807ec30c97a9099462e55c996d
Diffstat (limited to 'external/python3')
-rw-r--r--external/python3/python-3.3.3-disable-obmalloc.patch.011
1 files changed, 11 insertions, 0 deletions
diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 b/external/python3/python-3.3.3-disable-obmalloc.patch.0
index 3b3abd0b3561..a162298d4971 100644
--- a/external/python3/python-3.3.3-disable-obmalloc.patch.0
+++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0
@@ -1,3 +1,14 @@
+--- Include/objimpl.h
++++ Include/objimpl.h
+@@ -250,7 +250,7 @@
+ union _gc_head *gc_prev;
+ Py_ssize_t gc_refs;
+ } gc;
+- double dummy; /* force worst-case alignment */
++ long double dummy; /* force worst-case alignment */
+ } PyGC_Head;
+
+ extern PyGC_Head *_PyGC_generation0;
--- Objects/obmalloc.c
+++ Objects/obmalloc.c
@@ -413,8 +413,8 @@