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

QHash::erase edge-case when erasing elements while traversing

XMLWordPrintable

      Essentially: while traversing a hash, erase()ing an element may free up a slot in the hash in which another already-visited element gets moved to. If this happens an element may be visited twice during traversal.

      Initially addressed in https://codereview.qt-project.org/c/qt/qtbase/+/354793, thought to be a small self-contained issue with erase()ing the last element in a hash.

      With https://codereview.qt-project.org/c/qt/qtbase/+/386376 it is proved that the edge-case scales for other than the last-of-hash element as well.

      Some comments on this are currently available on https://codereview.qt-project.org/c/qt/qtbase/+/386376/1..2//COMMIT_MSG#b20 

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

            cnn Qt Core & Network
            manordheim Mårten Nordheim
            Vladimir Minenko Vladimir Minenko
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes