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

A QString::prepend("data") loop never produces freeSpaceAtBegin().

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • dev
    • None
    • e4682408b (dev), c2ce67af9 (6.5), ff469d570 (6.6)

    Description

      Discussion at https://codereview.qt-project.org/c/qt/qtbase/+/479873/comment/8ee81717_079940ee/

      The following loop does not terminate before the system runs out of memory:

      QString s;
      while (!s.d.freeSpaceAtBegin())
          s.prepend("data");
      

      Looks like it's due to the size of the data being 4. It works with prepend(u'd').

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            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:

              Gerrit Reviews

                There are no open Gerrit changes