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

Qt executables are miscompiled with LTO

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 6.4.3
    • Build System: CMake
    • None
    • Linux x86_64
    • Linux/X11

    Description

      Since qtbase commit 550ee1d7529af7440cf3e3444526249f3de3e4ab, executables from other Qt modules (such as designer or assistant from qttools) segfault when compiled with LTO:

      Thread 1 "designer6" received signal SIGSEGV, Segmentation fault.
      doActivate<false> (sender=0x0, signal_index=9, argv=0x7fffffffd6c0)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/corelib/kernel/qobject.cpp:3861
      3861        QObjectPrivate *sp = QObjectPrivate::get(sender);                                                                                             
      (gdb) bt
      #0  doActivate<false> (sender=0x0, signal_index=9, argv=0x7fffffffd6c0)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/corelib/kernel/qobject.cpp:3861
      #1  0x00007ffff659db87 in QGuiApplication::screenAdded (this=<optimized out>, _t1=<optimized out>)
          at /usr/src/debug/qt6-base/build/src/gui/Gui_autogen/include/moc_qguiapplication.cpp:485
      #2  0x00007ffff65fc0d3 in QWindowSystemInterface::handleScreenAdded (ps=<optimized out>, isPrimary=<optimized out>)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/gui/kernel/qwindowsysteminterface.cpp:762
      #3  0x00007ffff27ead66 in QXcbConnection::initializeScreens (this=0x555555618f60, initialized=<optimized out>)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/plugins/platforms/xcb/qxcbconnection_screens.cpp:347
      #4  0x00007ffff27dc1d2 in QXcbConnection::QXcbConnection (this=<optimized out>, nativeInterface=<optimized out>, canGrabServer=<optimized out>, 
          defaultVisualId=<optimized out>, displayName=<optimized out>, this=<optimized out>, nativeInterface=<optimized out>, canGrabServer=<optimized out>, 
          defaultVisualId=<optimized out>, displayName=<optimized out>)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/plugins/platforms/xcb/qxcbconnection.cpp:72
      #5  0x00007ffff2806008 in QXcbIntegration::QXcbIntegration (this=<optimized out>, parameters=..., argc=<optimized out>, argv=<optimized out>, 
          this=<optimized out>, parameters=..., argc=<optimized out>, argv=<optimized out>)
          at /usr/src/debug/qt6-base/build/include/QtCore/../../../qtbase-everywhere-src-6.4.3/src/corelib/tools/qscopedpointer.h:104
      #6  0x00007ffff4e8b353 in QXcbIntegrationPlugin::create (this=<optimized out>, system=..., parameters=..., argc=@0x7fffffffe02c: 1, argv=0x7fffffffe388)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/plugins/platforms/xcb/qxcbmain.cpp:22
      #7  0x00007ffff6596353 in init_platform (argv=<optimized out>, argc=@0x7fffffffe02c: 1, platformThemeName=..., platformPluginPath=..., 
          pluginNamesWithArguments=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/gui/kernel/qguiapplication.cpp:1192
      #8  QGuiApplicationPrivate::createPlatformIntegration (this=0x555555604870)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/gui/kernel/qguiapplication.cpp:1472
      #9  0x00007ffff6597a09 in QGuiApplicationPrivate::createEventDispatcher (this=<optimized out>)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/gui/kernel/qguiapplication.cpp:1489
      #10 0x00007ffff5f2fb4c in QCoreApplicationPrivate::init (this=this@entry=0x555555604870)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/corelib/kernel/qcoreapplication.cpp:814
      #11 0x00007ffff6597a91 in QGuiApplicationPrivate::init (this=this@entry=0x555555604870)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/gui/kernel/qguiapplication.cpp:1513
      #12 0x00007ffff6d6c92e in QApplicationPrivate::init (this=0x555555604870)
          at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/widgets/kernel/qapplication.cpp:462
      #13 0x00007ffff6d6ca52 in QApplication::QApplication (this=<optimized out>, argc=<optimized out>, argv=<optimized out>, this=<optimized out>, 
          argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.4.3/src/widgets/kernel/qapplication.cpp:450
      #14 0x000055555557566a in QDesigner::QDesigner (argv=<optimized out>, argc=@0x7fffffffe02c: 1, this=0x7fffffffe1b0)
          at /usr/src/debug/qt6-tools/qttools-everywhere-src-6.4.3/src/designer/src/designer/qdesigner.cpp:56
      #15 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/qt6-tools/qttools-everywhere-src-6.4.3/src/designer/src/designer/main.cpp:28
      

      Using GCC 12.2.1

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            arojas Antonio Rojas
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes