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

QByteArray::count(ch) reports wrong result for more than 2Gi occurrences

    XMLWordPrintable

Details

    • 1
    • 84e15f662e (qt/qtbase/dev) 84e15f662e (qt/tqtc-qtbase/dev)
    • Foundation Sprint 61

    Description

      This code fails on 64-bit platforms:

      const QByteArray b(qsizetype(INT_MAX) + 1, 'A');
      assert(b.count('A') == b.size());
      

      There's some truncation going on.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-105027
          # Subject Branch Project Status CR V

          Activity

            People

              mmutz Marc Mutz
              mmutz Marc Mutz
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are 2 open Gerrit changes