diff -r 0082b7bf9501 Misc/NEWS --- a/Misc/NEWS Mon Feb 18 22:04:59 2013 -0500 +++ b/Misc/NEWS Tue Feb 19 14:09:20 2013 -0800 @@ -9,6 +9,9 @@ Core and Builtins ----------------- +- On x86 systems fix the ctypes libffi to align the stack to 16-bytes. This + allows libraries being called to use SSE instructions without crashing. + - Issue #7963: Fixed misleading error message that issued when object is called without arguments. diff -r 0082b7bf9501 Modules/_ctypes/libffi/src/x86/sysv.S --- a/Modules/_ctypes/libffi/src/x86/sysv.S Mon Feb 18 22:04:59 2013 -0500 +++ b/Modules/_ctypes/libffi/src/x86/sysv.S Tue Feb 19 14:09:20 2013 -0800 @@ -48,6 +48,9 @@ movl 16(%ebp),%ecx subl %ecx,%esp + /* Align the stack pointer to 16-bytes */ + andl $0xfffffff0, %esp + movl %esp,%eax /* Place all of the ffi_prep_args in position */