[Pkg-audacious-maintainers] Bug#489037: audacious: "Illegal instruction" at start on i386 systems

Jan Christoph Nordholz hesso at pool.math.tu-berlin.de
Sat Jul 5 23:47:49 UTC 2008


Hi,

I've done a bit of backtracking:

* Offending instruction(s):
] jcn at hejre:~$ gdb /usr/bin/audacious core.11650 
] GNU gdb 6.8-debian
] (gdb) disass $eip $eip+32
] Dump of assembler code from 0x80a4122 to 0x80a4142:
] 0x080a4122 <gdk_window_show at plt+316186>:        movsd  -0x18(%ebp),%xmm0
] 0x080a4127 <gdk_window_show at plt+316191>:        cvttsd2si %xmm0,%eax
] [...]

(These are SSE2 instructions.)

* Problem:
The configure script tests for SSE2 by compiling a program similar to

] #include <emmintrin.h>
] void X()
] {
]   _mm_setzero_pd();
] }

and checking whether it runs without getting SIGILL. This is a bad SSE test,
however, because on non-SSE hosts the instructions are simply left out, i.e.
the above compiles on older CPUs (e.g. my Athlon Thunderbird) to

] 00000000 <X>:
]    0:   55                      push   %ebp
]    1:   89 e5                   mov    %esp,%ebp
]    3:   5d                      pop    %ebp
]    4:   c3                      ret    

whereas more recent systems yield

] 00000000 <X>:
]    0:   55                      push   %ebp
]    1:   89 e5                   mov    %esp,%ebp
]    3:   83 ec 18                sub    $0x18,%esp
]    6:   66 0f 57 c0             xorpd  %xmm0,%xmm0
]    a:   66 0f 29 45 e8          movapd %xmm0,-0x18(%ebp)
]    f:   c9                      leave  
]   10:   c3                      ret    

both without warning. Thus '-msse2' is enabled regardless of this test, and
the resulting binary fails on non-SSE2 hosts.


Regards,

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-audacious-maintainers/attachments/20080706/abec49b4/attachment.pgp 


More information about the Pkg-audacious-maintainers mailing list