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

Design flaw in QXmlPatterns: recursion leads to stack overflow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.4.0
    • 5.3.0, 5.3.1
    • XML: QtXmlPatterns
    • None
    • d1b17740ed4d9b1e3c3ad5898bb8259969dc77df

    Description

      Hi,
      I found a disturbing thing in QXmlPatterns - QPatternist::ItemMappingIterator::next() recursively calls itself, which leads to stack overflow if a XPath query is being done on a relatively large data set (in my example - about 15k xml elements). This results from a call in qnodesort.cpp:80:

      Item::List nodes(m_operand->evaluateSequence(context)->toList());

      The toList() method calls next() and all hell breaks loose.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              krojew Kamil Rojewski
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes