Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-36807

MinGW crashes in ucstrncmp (SSE2 path)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.3.0
    • Fix Version/s: 5.3.0
    • Labels:
      None
    • Environment:
      MinGW-builds 32 bit 4.7.2, MinGW-builds 32 bit 4.8.2, qtbase sha db98d65415b270f49e015154a37a39befc8c752e .
    • Commits:
      71de22b03f5e568f4a47c712c0a215c557d9162f

      Description

      With latest qt-dev I get regular crashes in MinGW-builds. Stack trace from an example:

      Program received signal SIGSEGV, Segmentation fault.
      ucstrncmp (a=0x136d7568, b=0x136d72b8, l=3)
          at D:\dev\qt\qt-dev\src\qtbase\src\corelib\tools\qstring.cpp:460
      460             m128i a_data = _mm_loadu_si128((m128i*)ptr);
      (gdb) bt
      #0  ucstrncmp (a=0x136d7568, b=0x136d72b8, l=3)
          at D:\dev\qt\qt-dev\src\qtbase\src\corelib\tools\qstring.cpp:460
      #1  0x6b7f842e in qMemEquals (a=0x136d7558, b=0x136d72a8, length=11)
          at D:\dev\qt\qt-dev\src\qtbase\src\corelib\tools\qstring.cpp:621
      #2  0x6b7fa819 in operator== (s1=..., s2=...)
          at D:\dev\qt\qt-dev\src\qtbase\src\corelib\tools\qstring.cpp:2504
      #3  0x629298af in QHashNode<QString, QHashDummyValue>::same_key (this=0x136d72f0, h0=3111004456,
          key0=...) at ../../../../include/QtCore/../../../../src/qtbase/src/corelib/tools/qhash.h:215
      #4  0x629258f0 in QHash<QString, QHashDummyValue>::findNode (this=0x136d5764, akey=...,
          ahp=0x28f14c)
          at ../../../../include/QtCore/../../../../src/qtbase/src/corelib/tools/qhash.h:929
      #5  0x629108da in QHash<QString, QHashDummyValue>::insert (this=0x136d5764, akey=..., avalue=...)
          at ../../../../include/QtCore/../../../../src/qtbase/src/corelib/tools/qhash.h:778
      #6  0x6290fe2c in QSet<QString>::insert (this=0x136d5764, value=...)
          at ../../../../include/QtCore/../../../../src/qtbase/src/corelib/tools/qset.h:194
      #7  0x62857673 in storeFont (f=0x63aaa8, textmetric=0x63ac14, type=2, namesSetIn=325932900)
          at D:\dev\qt\qt-dev\src\qtbase\src\plugins\platforms\windows\qwindowsfontdatabase.cpp:949
      #8  0x7678c4af in MaskBlt () from C:\Windows\syswow64\gdi32.dll
      #9  0x7678c587 in GDI32!EnumFontFamiliesExW () from C:\Windows\syswow64\gdi32.dll
      #10 0x62857929 in QWindowsFontDatabase::populate (this=0x136d5760, family=...)
          at D:\dev\qt\qt-dev\src\qtbase\src\plugins\platforms\windows\qwindowsfontdatabase.cpp:991
      #11 0x628576c8 in QWindowsFontDatabase::populateFontDatabase (this=0x136d5760)
          at D:\dev\qt\qt-dev\src\qtbase\src\plugins\platforms\windows\qwindowsfontdatabase.cpp:959
      #12 0x01f43cbc in initializeDb ()
          at D:/dev/qt/qt-dev/src/qtbase/src/gui/text/qfontdatabase_qpa.cpp:145
      #13 0x01f443b5 in QFontDatabase::findFont (script=2, fp=0x3ff0c8, request=..., multi=true)
          at D:/dev/qt/qt-dev/src/qtbase/src/gui/text/qfontdatabase_qpa.cpp:295
      #14 0x01f44e56 in QFontDatabase::load (d=0x3ff0c8, script=2)
          at D:/dev/qt/qt-dev/src/qtbase/src/gui/text/qfontdatabase_qpa.cpp:442
      #15 0x01f2dd01 in QFontPrivate::engineForScript (this=0x3ff0c8, script=2)
          at D:\dev\qt\qt-dev\src\qtbase\src\gui\text\qfont.cpp:218
      #16 0x01f3e610 in QFontMetrics::height (this=0x28f6f0)
          at D:\dev\qt\qt-dev\src\qtbase\src\gui\text\qfontmetrics.cpp:305
      #17 0x09c5b883 in QTabBar::tabSizeHint (this=0x136d3fb0, index=0)
          at D:\dev\qt\qt-dev\src\qtbase\src\widgets\widgets\qtabbar.cpp:1376
      #18 0x09c58153 in QTabBarPrivate::layoutTabs (this=0x136d42d0)
          at D:\dev\qt\qt-dev\src\qtbase\src\widgets\widgets\qtabbar.cpp:445
      #19 0x09c5aef2 in QTabBar::sizeHint (this=0x136d3fb0)
          at D:\dev\qt\qt-dev\src\qtbase\src\widgets\widgets\qtabbar.cpp:1266
      #20 0x09c5fd85 in QTabWidget::initStyleOption (this=0x136d3a10, option=0x28f9e8)
          at D:\dev\qt\qt-dev\src\qtbase\src\widgets\widgets\qtabwidget.cpp:295
      #21 0x09c60c7c in QTabWidget::setUpLayout (this=0x136d3a10, onlyCheck=false)
          at D:\dev\qt\qt-dev\src\qtbase\src\widgets\widgets\qtabwidget.cpp:780
      #22 0x09c6034b in QTabWidget::insertTab (this=0x136d3a10, index=0, w=0x136d4ce0, icon=...,
          label=...) at D:\dev\qt\qt-dev\src\qtbase\src\widgets\widgets\qtabwidget.cpp:467
      #23 0x09c602b1 in QTabWidget::insertTab (this=0x136d3a10, index=-1, w=0x136d4ce0, label=...)
          at D:\dev\qt\qt-dev\src\qtbase\src\widgets\widgets\qtabwidget.cpp:445
      #24 0x09c60238 in QTabWidget::addTab (this=0x136d3a10, child=0x136d4ce0, label=...)
          at D:\dev\qt\qt-dev\src\qtbase\src\widgets\widgets\qtabwidget.cpp:391
      #25 0x00409c6b in Ui_BearerMonitor::setupUi (this=0x28fdd0, BearerMonitor=0x28fdb8)
          at .uic/ui_bearermonitor_640_480.h:314
      #26 0x0040177c in BearerMonitor::BearerMonitor (this=0x28fdb8, parent=0x0)
          at D:\dev\qt\qt-dev\src\qtbase\examples\network\bearermonitor\bearermonitor.cpp:58
      #27 0x00401682 in main (argc=1, argv=0x3f3508)
          at D:\dev\qt\qt-dev\src\qtbase\examples\network\bearermonitor\main.cpp:52
      

      Reverting ucstrncmp to the non-SSE2 enabled version from Qt 5.2, before change f32a5b15, fixes the crash.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              thiago Thiago Macieira
              Reporter:
              kkohne Kai Köhne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes