Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57773

new-delete-type-mismatch detected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.0 Beta 2
    • 5.7.0
    • GUI: OpenGL
    • None
    • fb85a72

    Description

      One of KDE's autotests caught a new-delete-type-mismatch through ASAN.

      Attached the output from ASAN

      18:15:51 =================================================================
      18:15:51 ==13802==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x614000027640 in thread T0:
      18:15:51   object passed to delete has wrong type:
      18:15:51   size of the allocated type:   400 bytes;
      18:15:51   size of the deallocated type: 16 bytes.
      18:15:51     #0 0x7fc1632614b2 in operator delete(void*, unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9a4b2)
      18:15:51     #1 0x7fc1624f947d in QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage() opengl/qopenglversionfunctions.cpp:81
      18:15:51     #2 0x7fc1621c1315 in QOpenGLContextPrivate::~QOpenGLContextPrivate() (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/qt5/inst/usr/lib/libQt5Gui.so.5+0x172315)
      18:15:51     #3 0x7fc1621c1365 in QOpenGLContextPrivate::~QOpenGLContextPrivate() (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/qt5/inst/usr/lib/libQt5Gui.so.5+0x172365)
      18:15:51     #4 0x7fc161701e93 in QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/qt5/inst/usr/lib/libQt5Core.so.5+0x363e93)
      18:15:51     #5 0x7fc1617002c0 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107
      18:15:51     #6 0x7fc1616f4d20 in QObject::~QObject() kernel/qobject.cpp:900
      18:15:51     #7 0x7fc1621beabf in QOpenGLContext::~QOpenGLContext() kernel/qopenglcontext.cpp:689
      18:15:51     #8 0x7fc1621beaf3 in QOpenGLContext::~QOpenGLContext() kernel/qopenglcontext.cpp:696
      18:15:51     #9 0x7fc162df817d in QSGGuiThreadRenderLoop::windowDestroyed(QQuickWindow*) scenegraph/qsgrenderloop.cpp:323
      18:15:51     #10 0x7fc162e3ed8f in QQuickWindow::~QQuickWindow() items/qquickwindow.cpp:1237
      18:15:51     #11 0x7fc151a105c1 in PlasmaQuick::Dialog::~Dialog() (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/frameworks/plasma-framework/inst/usr/lib/x86_64-linux-gnu/libKF5PlasmaQuick.so.5+0x1235c1)
      18:15:51     #12 0x7fc151f4bce4 in QQmlPrivate::QQmlElement<PlasmaQuick::Dialog>::~QQmlElement() (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/frameworks/plasma-framework/inst/usr/lib/x86_64-linux-gnu/qml/org/kde/plasma/core/libcorebindingsplugin.so+0x162ce4)
      18:15:51     #13 0x7fc151f4bd6d in QQmlPrivate::QQmlElement<PlasmaQuick::Dialog>::~QQmlElement() (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/frameworks/plasma-framework/inst/usr/lib/x86_64-linux-gnu/qml/org/kde/plasma/core/libcorebindingsplugin.so+0x162d6d)
      18:15:51     #14 0x41f82f in QScopedPointerDeleter<QObject>::cleanup(QObject*) /srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/qt5/inst/usr/include/QtCore/qscopedpointer.h:60
      18:15:51     #15 0x41e7a1 in QScopedPointer<QObject, QScopedPointerDeleter<QObject> >::~QScopedPointer() /srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/qt5/inst/usr/include/QtCore/qscopedpointer.h:107
      18:15:51     #16 0x41c6b0 in KWin::OnScreenNotification::~OnScreenNotification() /home/jenkins/sources/kwin/kf5-qt5/onscreennotification.cpp:55
      18:15:51     #17 0x410349 in OnScreenNotificationTest::show() /home/jenkins/sources/kwin/kf5-qt5/autotests/onscreennotificationtest.cpp:42
      18:15:51     #18 0x42095f in OnScreenNotificationTest::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jenkins/sources/kwin/kf5-qt5/build/autotests/moc_onscreennotificationtest.cpp:80
      18:15:51     #19 0x7fc1616c3bda in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const kernel/qmetaobject.cpp:2222
      18:15:51     #20 0x7fc1642f776c in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/qt5/inst/usr/lib/libQt5Test.so.5+0x1c76c)
      18:15:51     #21 0x7fc1642f0820 in QTest::TestMethods::invokeTestOnData(int) const /home/jenkins/sources/qt5/kf5-qt5/qtbase/src/testlib/qtestcase.cpp:800
      18:15:51     #22 0x7fc1642f1353 in QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const /home/jenkins/sources/qt5/kf5-qt5/qtbase/src/testlib/qtestcase.cpp:981
      18:15:51     #23 0x7fc1642f25d6 in QTest::TestMethods::invokeTests(QObject*) const /home/jenkins/sources/qt5/kf5-qt5/qtbase/src/testlib/qtestcase.cpp:1314
      18:15:51     #24 0x7fc1642f31f7 in QTest::qExec(QObject*, int, char**) /home/jenkins/sources/qt5/kf5-qt5/qtbase/src/testlib/qtestcase.cpp:1724
      18:15:51     #25 0x40f5e4 in main /home/jenkins/sources/kwin/kf5-qt5/autotests/onscreennotificationtest.cpp:31
      18:15:51     #26 0x7fc160a5babf in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20abf)
      18:15:51     #27 0x40d118 in _start (/home/jenkins/sources/kwin/kf5-qt5/build/autotests/testOnScreenNotification+0x40d118)
      18:15:51 
      18:15:51 0x614000027640 is located 0 bytes inside of 400-byte region [0x614000027640,0x6140000277d0)
      18:15:51 allocated by thread T0 here:
      18:15:51     #0 0x7fc1632608b2 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x998b2)
      18:15:51     #1 0x7fc1624f9563 in QOpenGLVersionFunctionsStorage::backend(QOpenGLContext*, QOpenGLVersionFunctionsBackend::Version) opengl/qopenglversionfunctions.cpp:108
      18:15:51     #2 0x7fc1624f9b10 in QAbstractOpenGLFunctionsPrivate::functionsBackend(QOpenGLContext*, QOpenGLVersionFunctionsBackend::Version) opengl/qopenglversionfunctions.cpp:122
      18:15:51     #3 0x7fc16251475d in QOpenGLFunctions_1_0::initializeOpenGLFunctions() opengl/qopenglfunctions_1_0.cpp:100
      18:15:51     #4 0x7fc1621bee83 in QOpenGLContext::versionFunctions(QOpenGLVersionProfile const&) const kernel/qopenglcontext.cpp:862
      18:15:51     #5 0x7fc1621c1dbe in QOpenGLFunctions_1_0* QOpenGLContext::versionFunctions<QOpenGLFunctions_1_0>() const (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/qt5/inst/usr/lib/libQt5Gui.so.5+0x172dbe)
      18:15:51     #6 0x7fc1621be166 in QOpenGLContextPrivate::maxTextureSize() kernel/qopenglcontext.cpp:382
      18:15:51     #7 0x7fc1624df66a in QOpenGLTextureGlyphCache::maxTextureHeight() const opengl/qopengltextureglyphcache.cpp:459
      18:15:51     #8 0x7fc162467acf in QTextureGlyphCache::populate(QFontEngine*, int, unsigned int const*, QFixedPoint const*) painting/qtextureglyphcache.cpp:208
      18:15:51     #9 0x7fc162dddcfa in QSGTextMaskMaterial::populate(QPointF const&, QVector<unsigned int> const&, QVector<QPointF> const&, QSGGeometry*, QRectF*, QPointF*, QMargins const&) scenegraph/qsgdefaultglyphnode_p.cpp:456
      18:15:51     #10 0x7fc162ddbc2b in QSGDefaultGlyphNode::update() scenegraph/qsgdefaultglyphnode.cpp:127
      18:15:51     #11 0x7fc162ea3fb9 in QQuickTextNode::addGlyphs(QPointF const&, QGlyphRun const&, QColor const&, QQuickText::TextStyle, QColor const&, QSGNode*) items/qquicktextnode.cpp:115
      18:15:51     #12 0x7fc162eaa7f6 in QQuickTextNodeEngine::addToSceneGraph(QQuickTextNode*, QQuickText::TextStyle, QColor const&) items/qquicktextnodeengine.cpp:777
      18:15:51     #13 0x7fc162ea4baa in QQuickTextNode::addTextLayout(QPointF const&, QTextLayout*, QColor const&, QQuickText::TextStyle, QColor const&, QColor const&, QColor const&, QColor const&, int, int, int, int) items/qquicktextnode.cpp:265
      18:15:51     #14 0x7fc162ea02f9 in QQuickText::updatePaintNode(QSGNode*, QQuickItem::UpdatePaintNodeData*) items/qquicktext.cpp:2304
      18:15:51     #15 0x7fc162e48a5f in QQuickWindowPrivate::updateDirtyNode(QQuickItem*) items/qquickwindow.cpp:3104
      18:15:51     #16 0x7fc162e476a5 in QQuickWindowPrivate::updateDirtyNodes() items/qquickwindow.cpp:2849
      18:15:51     #17 0x7fc162e3a8d2 in QQuickWindowPrivate::syncSceneGraph() items/qquickwindow.cpp:419
      18:15:51     #18 0x7fc162df86bc in QSGGuiThreadRenderLoop::renderWindow(QQuickWindow*) scenegraph/qsgrenderloop.cpp:391
      18:15:51     #19 0x7fc162df8c95 in QSGGuiThreadRenderLoop::exposureChanged(QQuickWindow*) scenegraph/qsgrenderloop.cpp:442
      18:15:51     #20 0x7fc162e39e45 in QQuickWindow::exposeEvent(QExposeEvent*) items/qquickwindow.cpp:216
      18:15:51     #21 0x7fc16217600d in QWindow::event(QEvent*) kernel/qwindow.cpp:2105
      18:15:51     #22 0x7fc162e3f69e in QQuickWindow::event(QEvent*) items/qquickwindow.cpp:1537
      18:15:51     #23 0x7fc151a17911 in PlasmaQuick::Dialog::event(QEvent*) (/srv/jenkins/install/ubuntu/x86_64/g++/kf5-qt5/frameworks/plasma-framework/inst/usr/lib/x86_64-linux-gnu/libKF5PlasmaQuick.so.5+0x12a911)
      18:15:51     #24 0x7fc1616b69a7 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) kernel/qcoreapplication.cpp:1122
      18:15:51     #25 0x7fc1616b65d1 in doNotify kernel/qcoreapplication.cpp:1063
      18:15:51     #26 0x7fc1616b6535 in QCoreApplication::notify(QObject*, QEvent*) kernel/qcoreapplication.cpp:1049
      18:15:51     #27 0x7fc1621623ef in QGuiApplication::notify(QObject*, QEvent*) kernel/qguiapplication.cpp:1648
      18:15:51     #28 0x7fc1616b64b2 in QCoreApplication::notifyInternal2(QObject*, QEvent*) kernel/qcoreapplication.cpp:988
      18:15:51     #29 0x7fc16216ac69 in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
      18:15:51 
      18:15:51 SUMMARY: AddressSanitizer: new-delete-type-mismatch ??:0 operator delete(void*, unsigned long)
      18:15:51 ==13802==HINT: if you don't care about these warnings you may set ASAN_OPTIONS=new_delete_type_mismatch=0
      18:15:51 ==13802==ABORTING
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              dfaure_kdab David Faure
              mgraesslin Martin Gräßlin
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes