Public bug reported:

Binary package hint: mingw32

Package: mingw32 version 4.2.1.dfsg-1ubuntu1
Debian Release: lenny/sid
  APT prefers hardy-updates
  APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500, 'hardy')
Architecture: amd64 (x86_64)

Hi, when using this version of mingw32 to cross-compile FFTW for Win32, 
we noticed that it miscompiles SSE code by generating misaligned data; 
this causes the compiled code to crash when run.  mingw32 in Debian 
stable works fine.  We've boiled it down to a simple test C file:

#include <xmmintrin.h>
union uvec {
  unsigned int x[4];
  __m128 v;
};
union uvec foo = { 1, 2, 3, 4};

Compile with:
        i586-mingw32msvc-gcc -msse -c --save-temps bug.c
and look at the resulting bug.s assembler output.  It is:

        .file   "bug.c"
.globl _foo
        .data
        .align 8
_foo:
        .long   1
        .long   2
        .long   3
        .long   4

Note the ".align 8" -- SSE code like this __m128 variable must be 
16-byte aligned, so it should be ".align 16". 

In contrast, i586-mingw32msvc-gcc 3.4.5 in the Debian stable version of 
mingw correctly produces ".align 16".  Similarly, Ubuntu's native gcc 
4.2.4 correctly produces ".align 16".  Hopefully, there is a newer 
upstream version of mingw32 that fixes this.

** Affects: mingw32 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
mingw32 misaligns SSE code (leading to crash of compiled programs)
https://bugs.launchpad.net/bugs/290381
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to