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

qdoc3 segfaults in node.cpp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 4.7.0
    • 4.6.2, 4.7.0
    • Documentation
    • None
    • OpenBSD 4.7 with Qt 4.6.2

      When building Qt Creator 1.3.1 qdoc3 segfaults while processing the documentation. The segfault occurs when "delete tree" is called at the end of processQdocconfFile() in tools/qdoc3/main.cpp. In InnerNode::removeChild() in tools/qdoc3/node.cpp the iterator returned by childMap.find() isn't checked:

      QMap<QString, Node *>::Iterator ent = childMap.find( child->name() );
      if ( *ent == child )

      I replaced the second line by:

      if ( ent != childMap.end() && *ent == child )

      Now qdoc3 doesn't segfault.

      There are two more places in InnerNode::removeChild() where the iterator returned by QMap.find() isn't checked.

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

            gbk Martin Smith (Qt)
            avoegele Andreas Vögele
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes