From: Neal Norwitz Date: Mon, 15 May 2006 07:22:23 +0000 (+0000) Subject: Backport: Patch #1488312, Fix memory alignment problem on SPARC in unicode. X-Git-Tag: v2.4.4c1~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9109341c43c28d25437b49d96db2b97f0cced540;p=thirdparty%2FPython%2Fcpython.git Backport: Patch #1488312, Fix memory alignment problem on SPARC in unicode. --- diff --git a/Misc/ACKS b/Misc/ACKS index 479d4094e65c..e1ebb9a891f6 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -440,6 +440,7 @@ Denis S. Otkidach Russel Owen Mike Pall Todd R. Palmer +Jan Palus Alexandre Parenteau Dan Parisien Harri Pasanen diff --git a/Misc/NEWS b/Misc/NEWS index 5adfc1178741..7df1bb0e33c5 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,6 +12,8 @@ What's New in Python 2.4.4c1? Core and builtins ----------------- +- Patch #1488312, Fix memory alignment problem on SPARC in unicode + Extension Modules ----------------- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index fc503c7badd5..5fce3f91c729 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -2302,7 +2302,7 @@ PyObject *_PyUnicode_DecodeUnicodeInternal(const char *s, end = s + size; while (s < end) { - *p = *(Py_UNICODE *)s; + memcpy(p, s, sizeof(Py_UNICODE)); /* We have to sanity check the raw data, otherwise doom looms for some malformed UCS-4 data. */ if (