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

[REG 5.15 -> 6.0.0] Crash when using iterators to default constructed QString

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 6.0.0 Beta2
    • None

    Description

      The following test crashes in Qt 6:

      void tst_QString::std_mismatch()
      {
          const QString s1("blabla");
          const QString s2;
          const auto mismatches = std::mismatch(s1.begin(),
                                                s1.end(),
                                                s2.begin());
          const int commonPrefixCount = mismatches.first - s1.begin();
          QCOMPARE(commonPrefixCount, 0);
      }
      

      The above test works fine in Qt 5.15

      Please see https://codereview.qt-project.org/c/qt/qtbase/+/324200

      This issue is a result of investigation on: QTCREATORBUG-24970

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              jkobus Jarek Kobus
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes