Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.2.1
-
None
-
6855b80eae (qt/tqtc-qtbase/6.3)
Description
This minimal example triggers the UndefinedBehaviorSanitizer:
QList<int> list;
list.count(2)
Output from UndefinedBehaviorSanitizer (clang 12.0.0)
/.../include/QtCore/qlist.h:198:52: runtime error: reference binding to null pointer of type 'const int' #0 0x5ac304 in QList<int>::const_iterator::operator*() const /.../include/QtCore/qlist.h:198:45 #1 0x5797e8 in long long QList<int>::count<int>(int const&) const /.../include/QtCore/qlist.h:524:38 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /.../include/QtCore/qlist.h:198:52 i
We discovered this in our test suite, when trying to migrate to Qt 6.2.