From: Antoine Pitrou Date: Sun, 23 Mar 2014 21:55:03 +0000 (+0100) Subject: Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by Andreas Schwab. X-Git-Tag: v3.4.1rc1~195 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8c6f8dc527d875f5b31f90925a9f61de7c351482;p=thirdparty%2FPython%2Fcpython.git Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by Andreas Schwab. --- diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index c088a0f0c13f..faa53d644fda 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -343,6 +343,9 @@ typedef struct { the data pointer is filled out. The bit is redundant, and helps to minimize the test in PyUnicode_IS_READY(). */ unsigned int ready:1; + /* Padding to ensure that PyUnicode_DATA() is always aligned to + 4 bytes (see issue #19537 on m68k). */ + unsigned int :24; } state; wchar_t *wstr; /* wchar_t representation (null-terminated) */ } PyASCIIObject; diff --git a/Misc/ACKS b/Misc/ACKS index 88753892137f..68617ce1b940 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1170,6 +1170,7 @@ Robin Schreiber Chad J. Schroeder Christian Schubert Sam Schulenburg +Andreas Schwab Stefan Schwarzer Dietmar Schwertberger Federico Schwindt diff --git a/Misc/NEWS b/Misc/NEWS index b20e45890646..0ec738833cb3 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ Release date: TBA Core and Builtins ----------------- +- Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by + Andreas Schwab. + - Issue #20929: Add a type cast to avoid shifting a negative number. - Issue #20731: Properly position in source code files even if they