[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#754894: Jessie Qt5.3 is build with SSE2 enabled for i386






On Tue, Jul 15, 2014 at 9:22 PM, Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> wrote:
reassign 754894 src:qtbase-opensource-src 5.2.0+dfsg-1
severity 754894 important
thanks

On Tuesday 15 July 2014 19:48:06 Boris Barbulovski wrote:
> Package: libqt5core5a (actually all qt5 libraries)
>   Version: 5.3.1+dfsg-3(jessie)
>
> >From Qt 5.3 SSE2 is enabled by default crashing every Qt app when run
>
> on i386 version with older(non SSE2) processor.
>
>
> Solution: Disable SSE2 when building Qt5 packages for i386.

Not quite.

Here is the location when it crashes (https://qt.gitorious.org/qt/qtbase/source/e0dc27d791cd2106f661bd3d949281aaf1239990:src/corelib/tools/qstring.cpp#L658 ignore the fact that it's qt git url.)
The crash location is first line after line '#ifdef __SSE2__'

here is the dgb output

(gdb) disas 0xb7984fb0, 0xb7984fff
Dump of assembler code from 0xb7984fb0 to 0xb7984fff:
   0xb7984fb0:    mov    %edx,%esi
   0xb7984fb2:    shl    $0x10,%esi
   0xb7984fb5:    or     %edx,%esi
   0xb7984fb7:    lea    0x10(%eax),%edx
   0xb7984fba:    mov    %esi,(%esp)
   0xb7984fbd:    movd   (%esp),%xmm2
   0xb7984fc2:    cmp    %edx,%ebp
=> 0xb7984fc4:    pshufd $0x0,%xmm2,%xmm1
   0xb7984fc9:    jae    0xb7984fd9
   0xb7984fcb:    jmp    0xb7984f6e
   0xb7984fcd:    lea    0x0(%esi),%esi
   0xb7984fd0:    lea    0x10(%edx),%eax
   0xb7984fd3:    cmp    %eax,%ebp
   0xb7984fd5:    jb     0xb7984f70
   0xb7984fd7:    mov    %eax,%edx
   0xb7984fd9:    movdqu -0x10(%edx),%xmm0
   0xb7984fde:    lea    -0x10(%edx),%esi
   0xb7984fe1:    pcmpeqw %xmm1,%xmm0
   0xb7984fe5:    pmovmskb %xmm0,%eax
   0xb7984fe9:    test   %ax,%ax
   0xb7984fec:    je     0xb7984fd0
   0xb7984fee:    sub    0xc(%esp),%esi

 

> I will paste paragraph from Phoronix article regarding this issue:
>
> *- Qt 5.3 by default for 32-built builds now depends upon SSE2 CPU support.
>  SSE2 CPUs have been around for the past decade and building code
> optimized for SSE2+ will yield better performance. SSE2 has been found
> since Intel Pentium 4 CPUs and for AMD hardware since the Opteron /
> Athlon 64 debut. Those building Qt 5.3 i386 binaries wishing to support
> ancient CPUs can pass -no-sse2 to still maintain pre-SSE2 compatibility.*
>
> here is the article
> <http://www.phoronix.com/scan.php?page=news_item&px=MTY3MDU>.

Please use good data sources: upstream.

There is a better fix pending someone to step up for doing the job. It's not
that simple as "just disable SSE2" because that would render some parts simply
unusable.


I don't understand what you mean by 'render some parts simply unusable'. Do you mean some libraries will not compile? AFAIK SSE2 usage is for performance reasons only(maybe I'm wrong).
I found this mail from Thiago Macieira(http://lists.qt-project.org/pipermail/development/2013-November/014085.html) where he explains the situation in more detail.

 
The correct fix is to build *some* of the libs twice: one with SSE2 support
and one without it. If properly installed the linker will do the correct job
at runtime.


Thiago(in the mail thread above) suggest something like two versions of the library.
 
Interestingly enough, so far no one has reproduced this bug so far. Can you
reproduce it? It would be good to know so you can tests the packages for us.


yes, I can reproduce the issue, and test the packages.

 
Kinds regards, Lisandro.

--

Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/

br, Boris..

Reply to: