Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.2.0, 6.3, 6.4
Description
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
Attachments
Issue Links
- relates to
-
QTBUG-105720 [Documentation] QHash is documented to not change order of items in the hash on erase()
- Reported
-
QTBUG-126372 Fix docs to state the fact that QHash::erase() is permanently broken
- Closed