Configure with -sanitize address, build and run tst_sensors_qmlcpp. Output:
********* Start testing of tst_sensors_qmlcpp *********
Config: Using QtTest library 6.5.0, Qt 6.5.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 9.3.1 20200406 [revision 6db837a5288ee3ca5ec504fbd5a765817e556ac2]), opensuse-leap 15.3
PASS : tst_sensors_qmlcpp::initTestCase()
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
QWARN : tst_sensors_qmlcpp::testReadingBindings() qt.qproperty.binding: setBinding: Could not set binding via bindable interface. The QBindable is read-only.
=================================================================
==11695==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d000003938 at pc 0x7f772725447f bp 0x7ffea3166dd0 sp 0x7ffea3166dc8
READ of size 8 at 0x60d000003938 thread T0
#0 0x7f772725447e (/home/qt/work/install/lib/libQt6Core.so.6+0x50b47e)
#1 0x7f77272544eb (/home/qt/work/install/lib/libQt6Core.so.6+0x50b4eb)
#2 0x7f772725453b (/home/qt/work/install/lib/libQt6Core.so.6+0x50b53b)
#3 0x7f77272544a9 (/home/qt/work/install/lib/libQt6Core.so.6+0x50b4a9)
#4 0x7f77272545b1 (/home/qt/work/install/lib/libQt6Core.so.6+0x50b5b1)
#5 0x7f7727254ac1 (/home/qt/work/install/lib/libQt6Core.so.6+0x50bac1)
#6 0x7f7727275b21 in QtPrivate::QPropertyBindingData::notifyObservers(QUntypedPropertyData*, QBindingStorage*) const (/home/qt/work/install/lib/libQt6Core.so.6+0x52cb21)
#7 0x7f772ab849fe (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x799fe)
#8 0x7f772ab846eb (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x796eb)
#9 0x7f772ab83d23 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x78d23)
#10 0x7f772ab81468 in QmlMagnetometerReading::readingUpdate() (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x76468)
#11 0x7f772ab901c9 in QmlSensorReading::update() (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x851c9)
#12 0x7f772ab8ffbc in QmlSensor::updateReading() (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x84fbc)
#13 0x7f772ab5ba6d (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x50a6d)
#14 0x7f772725e611 (/home/qt/work/install/lib/libQt6Core.so.6+0x515611)
#15 0x7f772724b0a6 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (/home/qt/work/install/lib/libQt6Core.so.6+0x5020a6)
#16 0x7f772861d904 in QSensor::readingChanged() (/home/qt/work/install/lib/libQt6Sensors.so.6+0x39904)
#17 0x7f7728636c88 in QSensorBackend::newReadingAvailable() (/home/qt/work/install/lib/libQt6Sensors.so.6+0x52c88)
#18 0x41973e in set_test_backend_reading(QSensor*, QMap<QString, QVariant> const&) /home/qt/work/qt/qtsensors/tests/auto/common/test_backends.cpp:95
#19 0x45a391 in testSensorReadings<QmlMagnetometer, QmlMagnetometerReading, double>(char const*, QMap<QString, QVariant> const&)::{lambda()#1}::operator()() const /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:70
#20 0x4c31fb in std::_Function_handler<void (), testSensorReadings<QmlMagnetometer, QmlMagnetometerReading, double>(char const*, QMap<QString, QVariant> const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) /usr/include/c++/9/bits/std_function.h:300
#21 0x4bab17 in std::function<void ()>::operator()() const /usr/include/c++/9/bits/std_function.h:688
#22 0x499f0e in void QTestPrivate::testReadOnlyPropertyBasics<QmlMagnetometerReading, double>(QmlMagnetometerReading&, double const&, double const&, char const*, std::function<void ()>, std::function<bool (double const&, double const&)>, std::function<char* (double const&)>) /home/qt/work/install/include/QtTest/6.5.0/QtTest/private/qpropertytesthelper_p.h:397
#23 0x45adea in void testSensorReadings<QmlMagnetometer, QmlMagnetometerReading, double>(char const*, QMap<QString, QVariant> const&) /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:67
#24 0x431856 in tst_sensors_qmlcpp::testReadingBindings() /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:118
#25 0x437144 in tst_sensors_qmlcpp::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) tests/auto/qml/qml_cpp/tst_sensors_qmlcpp_autogen/include/tst_sensors_qmlcpp.moc:108
#26 0x7f772715635e in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/home/qt/work/install/lib/libQt6Core.so.6+0x40d35e)
#27 0x7f77282e399c (/home/qt/work/install/lib/libQt6Test.so.6+0xab99c)
#28 0x7f77282c6a60 (/home/qt/work/install/lib/libQt6Test.so.6+0x8ea60)
#29 0x7f77282c947a (/home/qt/work/install/lib/libQt6Test.so.6+0x9147a)
#30 0x7f77282ccc2e (/home/qt/work/install/lib/libQt6Test.so.6+0x94c2e)
#31 0x7f77282cfd2a in QTest::qRun() (/home/qt/work/install/lib/libQt6Test.so.6+0x97d2a)
#32 0x7f77282ceaab in QTest::qExec(QObject*, int, char**) (/home/qt/work/install/lib/libQt6Test.so.6+0x96aab)
#33 0x437008 in main /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:401
#34 0x7f7725e0c34c in __libc_start_main (/lib64/libc.so.6+0x2534c)
#35 0x414c69 in _start (/home/qt/work/qt/qtsensors_standalone_tests/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp+0x414c69)
0x60d000003938 is located 24 bytes inside of 144-byte region [0x60d000003920,0x60d0000039b0)
freed by thread T0 here:
#0 0x7f772af62a97 in free (/usr/lib64/libasan.so.5+0x109a97)
#1 0x7f772727bbac (/home/qt/work/install/lib/libQt6Core.so.6+0x532bac)
#2 0x7f772727c1bf (/home/qt/work/install/lib/libQt6Core.so.6+0x5331bf)
#3 0x7f77272781ab in QBindingStorage::registerDependency_helper(QUntypedPropertyData const*) const (/home/qt/work/install/lib/libQt6Core.so.6+0x52f1ab)
#4 0x7f772ab6f80c (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x6480c)
#5 0x7f772ab84123 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x79123)
#6 0x7f772ab82025 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x77025)
#7 0x7f772ab8355d (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x7855d)
#8 0x7f772ab834c7 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x784c7)
#9 0x7f772ab833f9 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x783f9)
#10 0x7f772ab82e2c (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x77e2c)
#11 0x7f772ab82f55 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x77f55)
#12 0x7f77272772ca (/home/qt/work/install/lib/libQt6Core.so.6+0x52e2ca)
#13 0x7f7727275d5e in QtPrivate::QPropertyBindingData::notifyObserver_helper(QUntypedPropertyData*, QPropertyObserverPointer, QBindingStorage*) const (/home/qt/work/install/lib/libQt6Core.so.6+0x52cd5e)
#14 0x7f7727275aea in QtPrivate::QPropertyBindingData::notifyObservers(QUntypedPropertyData*, QBindingStorage*) const (/home/qt/work/install/lib/libQt6Core.so.6+0x52caea)
#15 0x7f772ab849fe (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x799fe)
#16 0x7f772ab846eb (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x796eb)
#17 0x7f772ab83d23 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x78d23)
#18 0x7f772ab81468 in QmlMagnetometerReading::readingUpdate() (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x76468)
#19 0x7f772ab901c9 in QmlSensorReading::update() (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x851c9)
#20 0x7f772ab8ffbc in QmlSensor::updateReading() (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x84fbc)
#21 0x7f772ab5ba6d (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x50a6d)
#22 0x7f772725e611 (/home/qt/work/install/lib/libQt6Core.so.6+0x515611)
#23 0x7f772724b0a6 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (/home/qt/work/install/lib/libQt6Core.so.6+0x5020a6)
#24 0x7f772861d904 in QSensor::readingChanged() (/home/qt/work/install/lib/libQt6Sensors.so.6+0x39904)
#25 0x7f7728636c88 in QSensorBackend::newReadingAvailable() (/home/qt/work/install/lib/libQt6Sensors.so.6+0x52c88)
#26 0x41973e in set_test_backend_reading(QSensor*, QMap<QString, QVariant> const&) /home/qt/work/qt/qtsensors/tests/auto/common/test_backends.cpp:95
#27 0x45a391 in testSensorReadings<QmlMagnetometer, QmlMagnetometerReading, double>(char const*, QMap<QString, QVariant> const&)::{lambda()#1}::operator()() const /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:70
#28 0x4c31fb in std::_Function_handler<void (), testSensorReadings<QmlMagnetometer, QmlMagnetometerReading, double>(char const*, QMap<QString, QVariant> const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) /usr/include/c++/9/bits/std_function.h:300
#29 0x4bab17 in std::function<void ()>::operator()() const /usr/include/c++/9/bits/std_function.h:688
#30 0x499f0e in void QTestPrivate::testReadOnlyPropertyBasics<QmlMagnetometerReading, double>(QmlMagnetometerReading&, double const&, double const&, char const*, std::function<void ()>, std::function<bool (double const&, double const&)>, std::function<char* (double const&)>) /home/qt/work/install/include/QtTest/6.5.0/QtTest/private/qpropertytesthelper_p.h:397
#31 0x45adea in void testSensorReadings<QmlMagnetometer, QmlMagnetometerReading, double>(char const*, QMap<QString, QVariant> const&) /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:67
#32 0x431856 in tst_sensors_qmlcpp::testReadingBindings() /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:118
#33 0x437144 in tst_sensors_qmlcpp::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) tests/auto/qml/qml_cpp/tst_sensors_qmlcpp_autogen/include/tst_sensors_qmlcpp.moc:108
#34 0x7f772715635e in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/home/qt/work/install/lib/libQt6Core.so.6+0x40d35e)
#35 0x7f77282e399c (/home/qt/work/install/lib/libQt6Test.so.6+0xab99c)
#36 0x7f77282c6a60 (/home/qt/work/install/lib/libQt6Test.so.6+0x8ea60)
#37 0x7f77282c947a (/home/qt/work/install/lib/libQt6Test.so.6+0x9147a)
#38 0x7f77282ccc2e (/home/qt/work/install/lib/libQt6Test.so.6+0x94c2e)
#39 0x7f77282cfd2a in QTest::qRun() (/home/qt/work/install/lib/libQt6Test.so.6+0x97d2a)
#40 0x7f77282ceaab in QTest::qExec(QObject*, int, char**) (/home/qt/work/install/lib/libQt6Test.so.6+0x96aab)
#41 0x437008 in main /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:401
#42 0x7f7725e0c34c in __libc_start_main (/lib64/libc.so.6+0x2534c)
previously allocated by thread T0 here:
#0 0x7f772af62e48 in __interceptor_malloc (/usr/lib64/libasan.so.5+0x109e48)
#1 0x7f772727b6f8 (/home/qt/work/install/lib/libQt6Core.so.6+0x5326f8)
#2 0x7f772727c094 (/home/qt/work/install/lib/libQt6Core.so.6+0x533094)
#3 0x7f77272781ab in QBindingStorage::registerDependency_helper(QUntypedPropertyData const*) const (/home/qt/work/install/lib/libQt6Core.so.6+0x52f1ab)
#4 0x7f772ab6f80c (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x6480c)
#5 0x7f772ab842f1 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x792f1)
#6 0x7f772ab824d1 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x774d1)
#7 0x7f772ab8357f (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x7857f)
#8 0x7f772ab834f7 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x784f7)
#9 0x7f772ab83429 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x78429)
#10 0x7f772ab83130 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x78130)
#11 0x7f772ab83259 (/home/qt/work/install/lib/libQt6SensorsQuick.so.6+0x78259)
#12 0x7f77272736f6 in QPropertyBindingPrivate::evaluateRecursive(QBindingStatus*) (/home/qt/work/install/lib/libQt6Core.so.6+0x52a6f6)
#13 0x7f7727274a12 in QtPrivate::QPropertyBindingData::setBinding(QUntypedPropertyBinding const&, QUntypedPropertyData*, void (*)(QUntypedPropertyData*), bool (*)(QMetaType, QUntypedPropertyData*, QtPrivate::QPropertyBindingFunction)) (/home/qt/work/install/lib/libQt6Core.so.6+0x52ba12)
#14 0x4c8fe5 in QProperty<double>::setBinding(QPropertyBinding<double> const&) /home/qt/work/install/include/QtCore/qproperty.h:409
#15 0x4be001 in QProperty<double>::setBinding(QUntypedPropertyBinding const&) /home/qt/work/install/include/QtCore/qproperty.h:416
#16 0x4999b7 in void QTestPrivate::testReadOnlyPropertyBasics<QmlMagnetometerReading, double>(QmlMagnetometerReading&, double const&, double const&, char const*, std::function<void ()>, std::function<bool (double const&, double const&)>, std::function<char* (double const&)>) /home/qt/work/install/include/QtTest/6.5.0/QtTest/private/qpropertytesthelper_p.h:392
#17 0x45adea in void testSensorReadings<QmlMagnetometer, QmlMagnetometerReading, double>(char const*, QMap<QString, QVariant> const&) /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:67
#18 0x431856 in tst_sensors_qmlcpp::testReadingBindings() /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:118
#19 0x437144 in tst_sensors_qmlcpp::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) tests/auto/qml/qml_cpp/tst_sensors_qmlcpp_autogen/include/tst_sensors_qmlcpp.moc:108
#20 0x7f772715635e in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/home/qt/work/install/lib/libQt6Core.so.6+0x40d35e)
#21 0x7f77282e399c (/home/qt/work/install/lib/libQt6Test.so.6+0xab99c)
#22 0x7f77282c6a60 (/home/qt/work/install/lib/libQt6Test.so.6+0x8ea60)
#23 0x7f77282c947a (/home/qt/work/install/lib/libQt6Test.so.6+0x9147a)
#24 0x7f77282ccc2e (/home/qt/work/install/lib/libQt6Test.so.6+0x94c2e)
#25 0x7f77282cfd2a in QTest::qRun() (/home/qt/work/install/lib/libQt6Test.so.6+0x97d2a)
#26 0x7f77282ceaab in QTest::qExec(QObject*, int, char**) (/home/qt/work/install/lib/libQt6Test.so.6+0x96aab)
#27 0x437008 in main /home/qt/work/qt/qtsensors/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp:401
#28 0x7f7725e0c34c in __libc_start_main (/lib64/libc.so.6+0x2534c)
SUMMARY: AddressSanitizer: heap-use-after-free (/home/qt/work/install/lib/libQt6Core.so.6+0x50b47e)
Shadow bytes around the buggy address:
0x0c1a7fff86d0: fa fa fa fa fa fa fd fd fd fd fd fd fd fd fd fd
0x0c1a7fff86e0: fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa
0x0c1a7fff86f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c1a7fff8700: fd fd fa fa fa fa fa fa fa fa fd fd fd fd fd fd
0x0c1a7fff8710: fd fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa
=>0x0c1a7fff8720: fa fa fa fa fd fd fd[fd]fd fd fd fd fd fd fd fd
0x0c1a7fff8730: fd fd fd fd fd fd fa fa fa fa fa fa fa fa fd fd
0x0c1a7fff8740: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
0x0c1a7fff8750: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c1a7fff8760: fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa
0x0c1a7fff8770: fa fa fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==11695==ABORTING