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

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

      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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes