Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.15.0
-
None
Description
We have lots of warnings when we run our unit tests on FreeBSD:
07:21:34 /usr/home/jenkins/workspace/default_Review_FreeBSD/build/test/qt/Test_core_DiagnosisModel_autogen/include/test_DiagnosisModel.moc:147:28: runtime error: member access within address 0x6080000003a0 which does not point to an object of type 'QObjectData' 07:21:34 0x6080000003a0: note: object is of type 'QObjectPrivate' 07:21:34 07 00 00 6c f8 27 ac 05 08 00 00 00 90 dd ff ff ff 7f 00 00 00 00 00 00 00 00 00 00 90 da a9 05 07:21:34 ^~~~~~~~~~~~~~~~~~~~~~~ 07:21:34 vptr for 'QObjectPrivate' 07:21:34 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/home/jenkins/workspace/default_Review_FreeBSD/build/test/qt
Line 147 of test_DiagnosisModel.moc is included in this function:
const QMetaObject *test_DiagnosisModel::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; }
There are different classes with different types in the warning:
QObjectPrivate, QAbstractItemModelPrivate, QStatePrivate, QTcpServerPrivate, ....
A similar issue was fixed in https://codereview.qt-project.org/c/qt/qtbase/+/151499