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

MSVC2015 miscompiles Qt in -ltcg -static mode.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.6.0, 5.6.1, 5.7.0, 5.7.1
    • Core: Other
    • None
    • Windows 10, MSVC 2015 Update 3 (and earlier, non-updated MSVC2015 is also affected, to my knowledge...)

      Build Qt on Windows with MSVC2015 (Update 3, but I believe any MSVC2015 release behaves the same, if I recall my testing correctly):

      configure -release -ltcg -static -developer-build -nomake examples -nomake tests -mp -opensource -confirm-license
      jom -j3 module-qtbase
      jom -j3 module-qttools

      Then try to run designer.exe or assistant.exe.

      They'll crash inside a qAtomicAssign via QAction::setShortcuts()... I don't have a full stack trace, because the steps above build without symbols.

      I'm not sure what's going on here, but it seems like a compiler bug. I'm posting it here, and not to MS Connect because I am not confident about who to blame at the moment.

      Here's a small reproducible case that will also cause the crash to happen:
      https://github.com/mkrautz/mumble-msvc2015-ltcg-crash-repro
      (But it depends on a Qt built with the above steps...)

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

            thiago Thiago Macieira
            mkrautz Mikkel Krautz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes