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

Consider to work around GCC Bug 58800 (std::nth_element segfaults)

    XMLWordPrintable

    Details

    • Commits:
      9302169bd5ad8380ebe95f50986d2b32eb486901

      Description

      ...at least for users building Qt from source with an unpatched/vanilla GCC/libstc++ 4.8.1/4.8.2.

      http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800

      The bug affects clients of std::nth_element and might lead to a crash. qtbase/src/concurrent/qtconcurrentmedian.h seems to be the only client so far. Prominent crashing application is Qt Creator when executing "Find Usages": QTCREATORBUG-10565.

      According to that bug report the GCC bug is fixed for versions "4.7.4/4.8.3/4.9.0.", but not for the last two released GCC versions: 4.8.2 and 4.8.1.

      Allan Sandfeld Jensen proposed in QTCREATORBUG-10565 to #ifdef out the use of nth_element for the affected versions of libstdc++. This will only affect about 3 lines since the commit introducing nth_element is quite trivial: 880b614c8ffd530251b9383e085ba094a1edbca8.

      Further notes:

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kosjar Nikolai Kosjar
              Reporter:
              kosjar Nikolai Kosjar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes