Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.0.2, 5.15.18, 6.2.13, 6.5.8, 6.7.3, 6.8.2, 6.9.0 RC
-
None
-
4
-
Foundation Sprint 127, Foundation Sprint 128
Description
There was an assymmetry between comparesEqual() and qHash() that I was finally able to exploit: op== checks !d and d->isEmpty(), while qHash() only checks !d, and then goes over all the QString fields, hashing them.
This is a reproducer:
QUrl null; QUrl other; other.setFragment("meep"); other.setUrl(QString()); // doesn't overwrite d->fragment QCOMPARE_EQ(null, other); QCOMPARE_EQ(qHash(null), qHash(other)); // fails
Attachments
Issue Links
- relates to
-
QTBUG-134900 QUrl's operator==() is taking bygone data into account
-
- In Progress
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-134896 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
632662,2 | tst_QUrl: add a reproducer for the op==/qHash() inconsistency | dev | qt/qtbase | Status: NEW | 0 | 0 |
632729,2 | QUrl: fix asymmetry between op==/qHash() | dev | qt/qtbase | Status: NEW | +2 | 0 |