See also bug 280, it is observed in fotowall loading ###### root@qemux86-64:~# DISPLAY=:0.0 fotowall QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed for BOM: Bad file descriptor QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed Illegal instruction ###### And dmesg shows ###### fotowall[842] trap invalid opcode ip:7f92361fc1ed sp:7ffff191b798 error:0 in libQtGui.so.4.6.3[7f9236067000+9d0000] ###### The offending function is qt_blend_argb32_on_argb3_sse2(), it calls intrinsic _mm_set_epi16, and it compiles to PSHUFB, which is only available in SSSE3. Qemu needs to run with -cpu qemux86-64,+ssse3 explicitly, or it crashes.
mark this bug at Intel confidential QtGui has an internal cpu dispatcher, so ideally gdrawhelper_sse2 shouldn't include ssse3 instructions, it uses -msse2 as gcc flags. PSHUFB is actually generated by the use of -march=core2 in gcc-4.5, reproducing it is simple --- $ cat a.c #include <emmintrin.h> __m128i f(int a) { return _mm_set1_epi16(a); } $ gcc-4.5 -O2 -m64 -march=core2 -c a.c $ objdump -d a.o 0000000000000000 <f>: 0: 66 0f 6e c7 movd %edi,%xmm0 4: 66 0f 38 00 05 00 00 pshufb 0x0(%rip),%xmm0 # d <f+0xd> b: 00 00 d: c3 retq --- it can be fixed in at least two ways: 1. not using -march=core2 for generic machine like qemux86-64 2. adding "-cpu qemu64,+ssse3" or "-cpu core2duo" into qemu command line #2 is easier, but it may leads to controversy like: http://mer-l-in.blogspot.com/2010/08/are-intel-subverting-meegocom.html
http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=59646974abd58812f3b37e62224bd41e71bedfbc
after removing the optimization flag, the crash doesn't happen anymore
marked as verified