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

Crash in Identifier::remove() during QScriptEngine::reportAdditionalMemoryCost

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.15.0 Beta4
    • 5.12.3
    • Qt Script
    • None
    • All
    • 97f194cfabf9d8ab186241760a29bae1f4811184 (qt/qtscript/5.15)

    Description

      QScriptEngine can crash during reportAdditionalMemoryCost if it triggers a gc of an Identifier.

      Here is an example stack trace from the High Fidelity interface.exe app. 

      >	Qt5Script.dll!QTWTF::HashTable<QTJSC::UStringImpl *,QTJSC::UStringImpl *,QTWTF::IdentityExtractor<QTJSC::UStringImpl *>,QTWTF::StrHash<QTJSC::UStringImpl *>,QTWTF::HashTraits<QTJSC::UStringImpl *>,QTWTF::HashTraits<QTJSC::UStringImpl *> >::find(QTJSC::UStringImpl * const & key) Line 324	C++
       	[Inline Frame] Qt5Script.dll!QTWTF::HashSet<QTJSC::UStringImpl *,QTWTF::StrHash<QTJSC::UStringImpl *>,QTWTF::HashTraits<QTJSC::UStringImpl *> >::find(QTJSC::UStringImpl * const &) Line 166	C++
       	[Inline Frame] Qt5Script.dll!QTWTF::HashSet<QTJSC::UStringImpl *,QTWTF::StrHash<QTJSC::UStringImpl *>,QTWTF::HashTraits<QTJSC::UStringImpl *> >::remove(QTJSC::UStringImpl * const &) Line 240	C++
       	[Inline Frame] Qt5Script.dll!QTJSC::IdentifierTable::remove(QTJSC::UStringImpl * r) Line 61	C++
       	Qt5Script.dll!QTJSC::Identifier::remove(QTJSC::UStringImpl * r) Line 239	C++
       	Qt5Script.dll!QTJSC::UStringImpl::~UStringImpl() Line 70	C++
       	[External Code]	
       	Qt5Script.dll!QTJSC::Heap::sweep() Line 1120	C++
       	Qt5Script.dll!QTJSC::Heap::recordExtraCost(unsigned __int64 cost) Line 358	C++
       	interface.exe!ScriptEngine::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 416	C++
       	Qt5Core.dll!QObject::event(QEvent * e) Line 1260	C++
       	Qt5Widgets.dll!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e) Line 3740	C++
       	Qt5Widgets.dll!QApplication::notify(QObject * receiver, QEvent * e) Line 3691	C++
       	interface.exe!Application::notify(QObject * object, QEvent * event) Line 4038	C++
       	Qt5Core.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * event) Line 1060	C++
       	[Inline Frame] Qt5Core.dll!QCoreApplication::sendEvent(QObject *) Line 1450	C++
       	Qt5Core.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver, int event_type, QThreadData * data) Line 1799	C++
       	Qt5Core.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, unsigned __int64 wp, __int64 lp) Line 247	C++
       	[External Code]	
       	Qt5Core.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 647	C++
       	[Inline Frame] Qt5Core.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag>) Line 138	C++
       	Qt5Core.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 225	C++
       	interface.exe!ScriptEngine::run() Line 1175	C++
       	[Inline Frame] Qt5Core.dll!QtPrivate::QSlotObjectBase::call(QObject *) Line 394	C++
       	Qt5Core.dll!QMetaObject::activate(QObject * sender, int signalOffset, int local_signal_index, void * * argv) Line 3782	C++
       	Qt5Core.dll!QThread::started(QThread::QPrivateSignal _t1) Line 163	C++
       	Qt5Core.dll!QThreadPrivate::start(void * arg) Line 401	C++
       	[External Code]	

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            tony-hifi Anthony Thibault
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes