Details
-
Task
-
Resolution: Done
-
P1: Critical
-
None
-
None
-
13
-
Qt6_Foundation_Sprint 37, Qt6_Foundation_Sprint 38, Qt6_Foundation_Sprint 39
Description
Given recent findings like QTBUG-89687 and QTBUG-91704 it seems essential to verify that containers behave correctly in an edge case of being empty.
Thus, we need a comprehensive test coverage for such scenarios.
Containers list (may not be complete):
- QList, QString, QByteArray
- QVarLengthArray
- QStack, QQueue
- QSet, QMap, QMultiMap
- QHash, QMultiHash
The following should be tested:
1. At least, no operation on an empty container causes a crash or UB (see related bug reports for an example)
2. At most, no operation on an empty container causes it to allocate memory - this is a soft requirement as some operations could detach straight away and we accept it (e.g. having an explicit if-statement would harm the performance)
Attachments
Issue Links
- relates to
-
QTBUG-89687 QMultiHash::equal_range crashes when called in a const member function
- Closed
-
QTBUG-91704 QMultiHash::count(key) crashes on empty container
- Closed
For Gerrit Dashboard: QTBUG-91736 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
358494,5 | QHash, QMultiHash: extend tests | dev | qt/qtbase | Status: MERGED | +2 | 0 |
358642,6 | Fix QMultiHash::keys(const T&) overload | dev | qt/qtbase | Status: MERGED | +2 | 0 |
358649,4 | QMultiHash::find - prevent detaching shared null | dev | qt/qtbase | Status: MERGED | +2 | 0 |
358719,2 | QMultiHash::find - prevent detaching shared null | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
358720,2 | QMultiHash::find - prevent detaching shared null | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
358848,4 | QSet: extend tests | dev | qt/qtbase | Status: MERGED | +2 | 0 |
358872,5 | QSet::erase - extend docs | dev | qt/qtbase | Status: MERGED | +2 | 0 |
358909,2 | Fix QMultiHash::keys(const T&) overload | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
358910,2 | Fix QMultiHash::keys(const T&) overload | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
358929,5 | QMap: extend unit tests | dev | qt/qtbase | Status: MERGED | +2 | 0 |
359036,3 | QMap::erase - extend docs to specify iterator limitations | dev | qt/qtbase | Status: MERGED | +2 | 0 |
359062,2 | QMap::erase - extend docs to specify iterator limitations | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
359063,2 | QMap::erase - extend docs to specify iterator limitations | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
359145,3 | QMultiMap: extend unit tests | dev | qt/qtbase | Status: MERGED | +2 | 0 |
359146,2 | QMultiMap::erase - extend docs to specify iterator limitations | dev | qt/qtbase | Status: MERGED | +2 | 0 |
359398,2 | QMultiMap::erase - extend docs to specify iterator limitations | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
359399,2 | QMultiMap::erase - extend docs to specify iterator limitations | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
359420,5 | QList: extend tests | dev | qt/qtbase | Status: MERGED | +2 | 0 |
360163,2 | QMap: extend unit tests | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
360164,2 | QMap: extend unit tests | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
360372,2 | QMultiMap: extend unit tests | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
360373,2 | QMultiMap: extend unit tests | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
360698,7 | QString: extend unit tests | dev | qt/qtbase | Status: MERGED | +2 | 0 |
360828,3 | Fix QString test compilation without QRegularExpression | dev | qt/qtbase | Status: MERGED | +2 | 0 |
360848,2 | QList: extend tests | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
360849,3 | QList: extend tests | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
360866,2 | QHash, QMultiHash: extend tests | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
360967,2 | QHash, QMultiHash: extend tests | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
361113,1 | QString: extend unit tests | 6.1 | qt/qtbase | Status: ABANDONED | 0 | 0 |
361223,2 | QSet::erase - extend docs | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
361224,2 | QSet::erase - extend docs | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
361395,3 | QString: extend unit tests | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
361399,2 | QSet: extend tests | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
361400,2 | QSet: extend tests | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
361438,11 | QByteArray: extend unit tests | dev | qt/qtbase | Status: MERGED | +2 | 0 |
361443,6 | QByteArray: fix indexOf/lastIndexOf | dev | qt/qtbase | Status: MERGED | +2 | 0 |
361709,3 | QHash/QSet: fix squeeze() for default-constructed container | dev | qt/qtbase | Status: MERGED | +2 | 0 |
361756,3 | QVarLengthArray: extend unit tests | dev | qt/qtbase | Status: MERGED | +2 | 0 |
362053,2 | QVarLengthArray: extend unit tests | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
362054,2 | QVarLengthArray: extend unit tests | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
362123,2 | QHash/QSet: fix squeeze() for default-constructed container | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
362124,2 | QHash/QSet: fix squeeze() for default-constructed container | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
362456,3 | Fix QString test compilation without QRegularExpression | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
362457,2 | Fix QString test compilation without QRegularExpression | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
362464,2 | QByteArray: fix indexOf/lastIndexOf | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
362465,2 | QByteArray: fix indexOf/lastIndexOf | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
362466,2 | QByteArray: extend unit tests | 6.1 | qt/qtbase | Status: MERGED | +2 | 0 |
362487,2 | QByteArray: extend unit tests | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |