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

Leak in QXmlQuery

    XMLWordPrintable

Details

    Description

      Valgrind says the following:

      ==22645== 12,772 (1,176 direct, 11,596 indirect) bytes in 2 blocks are definitely lost in loss record 100 of 162
      ==22645== at 0x4022C6C: operator new[](unsigned) (vg_replace_malloc.c:265)
      ==22645== by 0x53755A7: QHashData::rehash(int) (qhash.cpp:273)
      ==22645== by 0x42396BE: QHash<QString, short>::reserve(int) (qhash.h:795)
      ==22645== by 0x422EC86: QPatternist::NamePool::NamePool() (qnamepool.cpp:25)
      ==22645== by 0x409B35E: QXmlNamePool::QXmlNamePool() (qxmlnamepool.cpp:49)
      ==22645== by 0x409D75F: QXmlQuery::QXmlQuery() (qxmlquery.cpp:229)
      ==22645== by 0x804D602: Transformator::execute(QIODevice*) (transformator.cpp:22)
      ==22645== by 0x804B995: MainWindow::execTransformation() (mainwindow.cpp:30)
      ==22645== by 0x804D9E6: MainWindow::qt_metacall(QMetaObject::Call, int, void**) (moc_mainwindow.cpp:66)
      ==22645== by 0x5477EA3: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3028)
      ==22645== by 0x5479434: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3100)
      ==22645== by 0x54C2A78: QTimer::timeout() (moc_qtimer.cpp:128)
      ==22645== by 0x548197D: QTimer::timerEvent(QTimerEvent*) (qtimer.cpp:231)
      ==22645== by 0x54754B9: QObject::event(QEvent*) (qobject.cpp:1043)
      ==22645== by 0x4642CE6: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4054)
      ==22645== by 0x464305F: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3601)
      ==22645== by 0x545E073: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:572)
      ==22645== by 0x463F226: QCoreApplication::sendEvent(QObject*, QEvent*) (qcoreapplication.h:183)
      ==22645== by 0x5497E76: QTimerInfoList::activateTimers() (qeventdispatcher_unix.cpp:542)
      ==22645== by 0x5495527: timerSourceDispatch(_GSource*, int (void*), void*) (qeventdispatcher_glib.cpp:134)
      ==22645==
      ==22645==
      ==22645== 13,114 (16 direct, 13,098 indirect) bytes in 1 blocks are definitely lost in loss record 102 of 162
      ==22645== at 0x4022FDC: operator new(unsigned) (vg_replace_malloc.c:221)
      ==22645== by 0x40C8D7D: QPatternist::DynamicContext::createReceiverContext(QAbstractXmlReceiver*) (qdynamiccontext.cpp:35)
      ==22645== by 0x40ECE82: QPatternist::ElementConstructor::evaluateToSequenceReceiver(QExplicitlySharedDataPointer<QPatternist::DynamicContext> const&) const (qelementconstructor.cpp:63)
      ==22645== by 0x409C147: QXmlQuery::evaluateTo(QAbstractXmlReceiver*) const (qxmlquery.cpp:660)
      ==22645== by 0x804D79D: Transformator::execute(QIODevice*) (transformator.cpp:27)
      ==22645== by 0x804B995: MainWindow::execTransformation() (mainwindow.cpp:30)
      ==22645== by 0x804D9E6: MainWindow::qt_metacall(QMetaObject::Call, int, void**) (moc_mainwindow.cpp:66)
      ==22645== by 0x5477EA3: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3028)
      ==22645== by 0x5479434: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3100)
      ==22645== by 0x54C2A78: QTimer::timeout() (moc_qtimer.cpp:128)
      ==22645== by 0x548197D: QTimer::timerEvent(QTimerEvent*) (qtimer.cpp:231)
      ==22645== by 0x54754B9: QObject::event(QEvent*) (qobject.cpp:1043)
      ==22645== by 0x4642CE6: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4054)
      ==22645== by 0x464305F: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3601)
      ==22645== by 0x545E073: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:572)
      ==22645== by 0x463F226: QCoreApplication::sendEvent(QObject*, QEvent*) (qcoreapplication.h:183)
      ==22645== by 0x5497E76: QTimerInfoList::activateTimers() (qeventdispatcher_unix.cpp:542)
      ==22645== by 0x5495527: timerSourceDispatch(_GSource*, int (void*), void*) (qeventdispatcher_glib.cpp:134)
      ==22645== by 0x55E8CC5: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.1600.6)
      ==22645== by 0x55EC082: (within /usr/lib/libglib-2.0.so.0.1600.6)
      ==22645==
      ==22645==
      ==22645== 22 bytes in 1 blocks are possibly lost in loss record 105 of 162
      ==22645== at 0x4022835: malloc (vg_replace_malloc.c:207)
      ==22645== by 0x5341CA2: qMalloc(unsigned) (qmalloc.cpp:25)
      ==22645== by 0x539C565: QString::QString(QChar const*, int) (qstring.cpp:816)
      ==22645== by 0x539CAA2: QString::mid(int, int) const (qstring.cpp:3086)
      ==22645== by 0x41B5607: QPatternist::XQueryTokenizer::tokenizeNCName() (qxquerytokenizer.cpp:630)
      ==22645== by 0x41B5695: QPatternist::XQueryTokenizer::tokenizeNCNameOrQName() (qxquerytokenizer.cpp:416)
      ==22645== by 0x41B0765: QPatternist::XQueryTokenizer::nextToken() (qxquerytokenizer.cpp:1374)
      ==22645== by 0x41B2E78: QPatternist::XQueryTokenizer::nextToken(YYLTYPE*) (qxquerytokenizer.cpp:2110)
      ==22645== by 0x4184765: QPatternist::XPathlex(QPatternist::TokenValue*, YYLTYPE*, QPatternist::ParserContext const*) (querytransformparser.ypp:664)
      ==22645== by 0x41874EE: QPatternist::XPathparse(QPatternist::ParserContext*) (qquerytransformparser.cpp:3603)
      ==22645== by 0x40F2925: QPatternist::ExpressionFactory::createExpression(QExplicitlySharedDataPointer<QPatternist::Tokenizer> const&, QExplicitlySharedDataPointer<QPatternist::StaticContext> const&, QXmlQuery::QueryLanguage, QExplicitlySharedDataPointer<QPatternist::SequenceType const> const&, QUrl const&, QXmlName const&) (qexpressionfactory.cpp:121)
      ==22645== by 0x40F479E: QPatternist::ExpressionFactory::createExpression(QIODevice*, QExplicitlySharedDataPointer<QPatternist::StaticContext> const&, QXmlQuery::QueryLanguage, QExplicitlySharedDataPointer<QPatternist::SequenceType const> const&, QUrl const&, QXmlName const&) (qexpressionfactory.cpp:95)
      ==22645== by 0x408A1DE: QXmlQueryPrivate::expression(QIODevice*) (qxmlquery_p.h:238)
      ==22645== by 0x409CE1C: QXmlQuery::setQuery(QIODevice*, QUrl const&) (qxmlquery.cpp:401)
      ==22645== by 0x409D266: QXmlQuery::setQuery(QString const&, QUrl const&) (qxmlquery.cpp:420)
      ==22645== by 0x804D709: Transformator::execute(QIODevice*) (transformator.cpp:25)
      ==22645== by 0x804B995: MainWindow::execTransformation() (mainwindow.cpp:30)
      ==22645== by 0x804D9E6: MainWindow::qt_metacall(QMetaObject::Call, int, void**) (moc_mainwindow.cpp:66)
      ==22645== by 0x5477EA3: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3028)
      ==22645== by 0x5479434: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3100)
      ==22645==
      ==22645==
      ==22645== 32 bytes in 2 blocks are definitely lost in loss record 115 of 162
      ==22645== at 0x4022FDC: operator new(unsigned) (vg_replace_malloc.c:221)
      ==22645== by 0x40C3AB1: QPatternist::Integer::fromValue(long long) (qinteger.cpp:24)
      ==22645== by 0x4176A84: QPatternist::RangeIterator::next() (qrangeiterator.cpp:53)
      ==22645== by 0x40FBD0C: QPatternist::ForClause::evaluateToSequenceReceiver(QExplicitlySharedDataPointer<QPatternist::DynamicContext> const&) const (qforclause.cpp:95)
      ==22645== by 0x4103A0C: QPatternist::LetClause::evaluateToSequenceReceiver(QExplicitlySharedDataPointer<QPatternist::DynamicContext> const&) const (qletclause.cpp:54)
      ==22645== by 0x4103A0C: QPatternist::LetClause::evaluateToSequenceReceiver(QExplicitlySharedDataPointer<QPatternist::DynamicContext> const&) const (qletclause.cpp:54)
      ==22645== by 0x40FBCEC: QPatternist::ForClause::evaluateToSequenceReceiver(QExplicitlySharedDataPointer<QPatternist::DynamicContext> const&) const (qforclause.cpp:94)
      ==22645== by 0x40F78C7: QPatternist::ExpressionSequence::evaluateToSequenceReceiver(QExplicitlySharedDataPointer<QPatternist::DynamicContext> const&) const (qexpressionsequence.cpp:49)
      ==22645== by 0x40ECEDE: QPatternist::ElementConstructor::evaluateToSequenceReceiver(QExplicitlySharedDataPointer<QPatternist::DynamicContext> const&) const (qelementconstructor.cpp:66)
      ==22645== by 0x409C147: QXmlQuery::evaluateTo(QAbstractXmlReceiver*) const (qxmlquery.cpp:660)
      ==22645== by 0x804D79D: Transformator::execute(QIODevice*) (transformator.cpp:27)
      ==22645== by 0x804B995: MainWindow::execTransformation() (mainwindow.cpp:30)
      ==22645== by 0x804D9E6: MainWindow::qt_metacall(QMetaObject::Call, int, void**) (moc_mainwindow.cpp:66)
      ==22645== by 0x5477EA3: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3028)
      ==22645== by 0x5479434: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3100)
      ==22645== by 0x54C2A78: QTimer::timeout() (moc_qtimer.cpp:128)
      ==22645== by 0x548197D: QTimer::timerEvent(QTimerEvent*) (qtimer.cpp:231)
      ==22645== by 0x54754B9: QObject::event(QEvent*) (qobject.cpp:1043)
      ==22645== by 0x4642CE6: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:4054)
      ==22645== by 0x464305F: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3601)
      ---------------------------------------------------------------------------------------------------------------------------------------------------

      Code example sent in private mail.

      Attachments

        Activity

          People

            qtsymbase Qt Base for Symbian Team
            fenglich Frans Englich (closed Nokia identity)
            Votes:
            6 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: