Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-12556

CppTodoItemsScanner and QmlJsTodoItemsScanner trigger undefined behavior

    XMLWordPrintable

Details

    • 919f26a488c76afea081d1d11948f30a6f90a1b3 817d02d11385a06e9b964cf7eef4004e112b66d8 329952f5ee792484bdb53141fcfb3dba15f05a60

    Description

      In these classes, a Qt::DirectConnection is created to signals of the C++ and QmlJs code models, respectively, and in the associated slots API functions from other plugins are called, e.g. ProjectExplorer::Project::files(). This is seriously wrong, as these functions are not thread-safe. Not surprisingly, crashes due to this code have been observed.
      Unfortunately, the fix is not trivial, as a QueuedConnection also results in a crash, presumably because the TODO plugin calls back on the code models with the assumption that they are in the exact same state in which they emitted the signal.

      Attachments

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

        Activity

          People

            fawzi Fawzi Mohamed
            kandeler Christian Kandeler
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes