components/python/cffi/patches/backend.patch
changeset 4894 7219201c1b0d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/cffi/patches/backend.patch	Wed Sep 23 14:00:51 2015 -0700
@@ -0,0 +1,26 @@
+
+CFFI has some alignment issues on 64bit SPARC. This has been already fixed in
+the upstream gate but has not made it into a release yet.
+
+https://bitbucket.org/cffi/cffi/issues/217/get_unique_type-doesnt-respect-alignment
+
+--- cffi-1.1.2/c/_cffi_backend.c	2015-06-09 03:04:10.000000000 -0700
++++ cffi-1.1.2/c/_cffi_backend.c	2015-08-25 13:11:20.603298092 -0700
+@@ -3410,7 +3410,6 @@
+            array      [ctype, length]
+            funcptr    [ctresult, ellipsis+abi, num_args, ctargs...]
+     */
+-    long i;
+     PyObject *key, *y;
+     const void **pkey;
+     int err;
+@@ -3420,8 +3419,7 @@
+         goto error;
+ 
+     pkey = (const void **)PyBytes_AS_STRING(key);
+-    for (i = 0; i < keylength; i++)
+-        pkey[i] = unique_key[i];
++    memcpy(pkey, unique_key, keylength * sizeof(void *));
+ 
+     y = PyDict_GetItem(unique_cache, key);
+     if (y != NULL) {