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

AddressSanitizer: heap-use-after-free in tst_opcua

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.9
    • 6.9
    • OpcUA
    • None
    • 247b3bae0 (dev), 8616972b2 (6.8), 96329d7ce (6.7)

    Description

      Found in nightly heath check:

      agent:2024/06/24 23:05:22 build.go:404: ==19202==ERROR: AddressSanitizer: heap-use-after-free on address 0x60200000cf38 at pc 0x7fc6cf4bca80 bp 0x7fc6a642faa0 sp 0x7fc6a642fa98
      agent:2024/06/24 23:05:22 build.go:404: READ of size 8 at 0x60200000cf38 thread T39 (QOpen62541Clien)
      agent:2024/06/24 23:05:22 build.go:404:     #0 0x7fc6cf4bca7f in QAbstractTestLogger::outputString(char const*) /home/qt/work/qt/qtbase/src/testlib/qabstracttestlogger.cpp:204
      agent:2024/06/24 23:05:22 build.go:404:     #1 0x7fc6cf4e0b18 in QPlainTestLogger::outputMessage(char const*) /home/qt/work/qt/qtbase/src/testlib/qplaintestlogger.cpp:253
      agent:2024/06/24 23:05:22 build.go:404:     #2 0x7fc6cf4e0e9c in QPlainTestLogger::printMessage(QPlainTestLogger::MessageSource, char const*, char const*, char const*, int) /home/qt/work/qt/qtbase/src/testlib/qplaintestlogger.cpp:294
      agent:2024/06/24 23:05:22 build.go:404:     #3 0x7fc6cf4e352d in QPlainTestLogger::addMessage(QAbstractTestLogger::MessageTypes, QString const&, char const*, int) /home/qt/work/qt/qtbase/src/testlib/qplaintestlogger.cpp:492
      agent:2024/06/24 23:05:22 build.go:404:     #4 0x7fc6cf4bd00c in QAbstractTestLogger::addMessage(QtMsgType, QMessageLogContext const&, QString const&) /home/qt/work/qt/qtbase/src/testlib/qabstracttestlogger.cpp:382
      agent:2024/06/24 23:05:22 build.go:404:     #5 0x7fc6cf4e3373 in QPlainTestLogger::addMessage(QtMsgType, QMessageLogContext const&, QString const&) /home/qt/work/qt/qtbase/src/testlib/qplaintestlogger.cpp:482
      agent:2024/06/24 23:05:22 build.go:404:     #6 0x7fc6cf561501 in messageHandler /home/qt/work/qt/qtbase/src/testlib/qtestlog.cpp:238
      agent:2024/06/24 23:05:22 build.go:404:     #7 0x7fc6c8fb4e5b in qt_message_print /home/qt/work/qt/qtbase/src/corelib/global/qlogging.cpp:2078
      agent:2024/06/24 23:05:22 build.go:404:     #8 0x7fc6c8fb507a in qt_message_output(QtMsgType, QMessageLogContext const&, QString const&) /home/qt/work/qt/qtbase/src/corelib/global/qlogging.cpp:2121
      agent:2024/06/24 23:05:22 build.go:404:     #9 0x7fc6c900dd77 in QDebug::~QDebug() /home/qt/work/qt/qtbase/src/corelib/io/qdebug.cpp:161
      agent:2024/06/24 23:05:22 build.go:404:     #10 0x7fc6aba89769 in Open62541AsyncBackend::open62541LogHandler(void*, UA_LogLevel, UA_LogCategory, char const*, __va_list_tag*) /home/qt/work/qt/qtopcua/src/plugins/opcua/open62541/qopen62541backend.cpp:463
      agent:2024/06/24 23:05:22 build.go:404:     #11 0x7fc6abc4c6c6 in UA_LOG_INFO /home/qt/work/qt/qtopcua/src/3rdparty/open62541/open62541.h:24643
      agent:2024/06/24 23:05:22 build.go:404:     #12 0x7fc6abc8839c in notifyClientState /home/qt/work/qt/qtopcua/src/3rdparty/open62541/open62541.c:45780
      agent:2024/06/24 23:05:22 build.go:404:     #13 0x7fc6abc89080 in __UA_Client_Service /home/qt/work/qt/qtopcua/src/3rdparty/open62541/open62541.c:46107
      agent:2024/06/24 23:05:22 build.go:404:     #14 0x7fc6abc8dc43 in sendCloseSession /home/qt/work/qt/qtopcua/src/3rdparty/open62541/open62541.c:47748
      agent:2024/06/24 23:05:22 build.go:404:     #15 0x7fc6abc8dca3 in closeSession /home/qt/work/qt/qtopcua/src/3rdparty/open62541/open62541.c:47758
      agent:2024/06/24 23:05:22 build.go:404:     #16 0x7fc6abc8de63 in UA_Client_disconnect /home/qt/work/qt/qtopcua/src/3rdparty/open62541/open62541.c:47815
      agent:2024/06/24 23:05:22 build.go:404:     #17 0x7fc6abaaa49f in Open62541AsyncBackend::disconnectInternal(QOpcUaClient::ClientError) /home/qt/work/qt/qtopcua/src/plugins/opcua/open62541/qopen62541backend.cpp:1911
      agent:2024/06/24 23:05:22 build.go:404:     #18 0x7fc6aba9a8a4 in Open62541AsyncBackend::disconnectFromEndpoint() /home/qt/work/qt/qtopcua/src/plugins/opcua/open62541/qopen62541backend.cpp:1194
      agent:2024/06/24 23:05:22 build.go:404:     #19 0x7fc6aba055e8 in Open62541AsyncBackend::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/qt/work/qt/qtopcua_build/src/plugins/opcua/open62541/QOpen62541Plugin_autogen/EWIEGA46WW/moc_qopen62541backend.cpp:485
      agent:2024/06/24 23:05:22 build.go:404:     #20 0x7fc6c92f26c0 in QMetaCallEvent::placeMetaCall(QObject*) /home/qt/work/qt/qtbase/src/corelib/kernel/qobject.cpp:622
      agent:2024/06/24 23:05:22 build.go:404:     #21 0x7fc6c92f51d9 in QObject::event(QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qobject.cpp:1419
      agent:2024/06/24 23:05:22 build.go:404:     #22 0x7fc6c91af5f3 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1328
      agent:2024/06/24 23:05:22 build.go:404:     #23 0x7fc6c91aed36 in doNotify /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1255
      agent:2024/06/24 23:05:22 build.go:404:     #24 0x7fc6c91aebe1 in QCoreApplication::notify(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1238
      agent:2024/06/24 23:05:22 build.go:404:     #25 0x7fc6cabb2d5e in QGuiApplication::notify(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/gui/kernel/qguiapplication.cpp:1994
      agent:2024/06/24 23:05:22 build.go:404:     #26 0x7fc6c91ae9d3 in QCoreApplication::notifyInternal2(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1154
      agent:2024/06/24 23:05:22 build.go:404:     #27 0x7fc6c91b05ca in QCoreApplication::sendEvent(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1598
      agent:2024/06/24 23:05:22 build.go:404:     #28 0x7fc6c91b3ee5 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1953
      agent:2024/06/24 23:05:22 build.go:404:     #29 0x7fc6c91b193d in QCoreApplication::sendPostedEvents(QObject*, int) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1787
      agent:2024/06/24 23:05:22 build.go:404:     #30 0x7fc6c9c4f4ce in postEventSourceDispatch /home/qt/work/qt/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:245
      agent:2024/06/24 23:05:22 build.go:404:     #31 0x7fc6c512082a in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x5582a)
      agent:2024/06/24 23:05:22 build.go:404:     #32 0x7fc6c5120bcf  (/usr/lib64/libglib-2.0.so.0+0x55bcf)
      agent:2024/06/24 23:05:22 build.go:404:     #33 0x7fc6c5120c5b in g_main_context_iteration (/usr/lib64/libglib-2.0.so.0+0x55c5b)
      agent:2024/06/24 23:05:22 build.go:404:     #34 0x7fc6c9c50ab6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/qt/work/qt/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:395
      agent:2024/06/24 23:05:22 build.go:404:     #35 0x7fc6c91e539c in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/qt/work/qt/qtbase/src/corelib/kernel/qeventloop.cpp:100
      agent:2024/06/24 23:05:22 build.go:404:     #36 0x7fc6c91e6761 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) /home/qt/work/qt/qtbase/src/corelib/kernel/qeventloop.cpp:191
      agent:2024/06/24 23:05:22 build.go:404:     #37 0x7fc6c95c570b in QThread::exec() /home/qt/work/qt/qtbase/src/corelib/thread/qthread.cpp:621
      agent:2024/06/24 23:05:22 build.go:404:     #38 0x7fc6c95c64fb in QThread::run() /home/qt/work/qt/qtbase/src/corelib/thread/qthread.cpp:742
      agent:2024/06/24 23:05:22 build.go:404:     #39 0x7fc6c980c6fe in operator() /home/qt/work/qt/qtbase/src/corelib/thread/qthread_unix.cpp:336
      agent:2024/06/24 23:05:22 build.go:404:     #40 0x7fc6c980ff24 in terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> > /home/qt/work/qt/qtbase/src/corelib/thread/qthread_unix.cpp:264
      agent:2024/06/24 23:05:22 build.go:404:     #41 0x7fc6c980ca55 in QThreadPrivate::start(void*) /home/qt/work/qt/qtbase/src/corelib/thread/qthread_unix.cpp:295
      agent:2024/06/24 23:05:22 build.go:404:     #42 0x7fc6c88aa6e9 in start_thread (/lib64/libpthread.so.
      

      Full log: https://testresults.qt.io/coin/api/log/qt/qtopcua/6e49bd410c0b78622aa7e77be83ec13c03fb7466/LinuxopenSUSE_15_5x86_64LinuxopenSUSE_15_5x86_64GCCqtci-linux-openSUSE-15.5-x86_64-52-46a70cSccache_UseAddressSanitizer_UseConfigure_WarningsAreErrors/48aefb2538377a01d85dd3d637f38c6c32718065/forceRun/test_1719271852/log.txt.gz
      Integration: https://testresults.qt.io/coin/integration/qt/qt5/tasks/nightly1719265502

      Attachments

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

        Activity

          People

            basyskom.jannis.voelker Jannis Völker
            jujokini Jukka Jokiniva
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change