Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.2, 6.6.0 Beta2, dev
-
None
-
Ubuntu 20.04, Clang 15, GCC 11, GCC 9
-
c86cf385d (dev), 2d4db1bff (6.5), 3a9bbf235 (6.6), 1845d4332 (dev), 1d7950c94 (dev), 0d15c000a (dev), c4aa3b0dc (6.7)
Description
Besides QTBUG-116076, and QTBUG-116077, which are probably still fixable before Qt 7, we also have that
- qHash(-42),
- qHash(-42LL)
produce different values, because we fold the upper half of the 64-bit word onto the lower half in a way that doesn't work with two's complement signed integers (it works just fine for unsigned integers).
Expectation would be, like in the epic, that equal values produce equal hash values.
This doesn't look fixable in Qt 6, as the qint32 and qint64 overloads are both inline, therefore immutable.
Attachments
Issue Links
- clones
-
QTBUG-116077 Inconsistent hashing between different FP types
- Reported
- relates to
-
QTBUG-116064 [REG SiC 6.4 -> 6.5] qHash(qfloat16(x)) is now ambiguous on GCC13
- Closed
For Gerrit Dashboard: QTBUG-116080 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
496753,3 | tst_QHashFunctions: extend the consistency() test with int/FP types | dev | qt/qtbase | Status: MERGED | +2 | 0 |
496754,10 | Add missing qHash(qu/int128) overloads | dev | qt/qtbase | Status: MERGED | +2 | 0 |
497081,2 | tst_QHashFunctions: extend the consistency() test with int/FP types | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
497082,2 | tst_QHashFunctions: extend the consistency() test with int/FP types | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
534826,6 | qHash: backport the q(u)int128-to-quint64 reduction trick to 32-bit | dev | qt/qtbase | Status: MERGED | +2 | 0 |
536950,6 | tst_QHashFunctions: make the consistency check table-driven | dev | qt/qtbase | Status: MERGED | +2 | 0 |
539549,2 | tst_QHashFunctions: make the consistency check table-driven | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |