Uploaded image for project: 'Qt Automotive Suite'
  1. Qt Automotive Suite
  2. AUTOSUITE-1410

Crash in parallel config file parsing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.11, 5.12.4, 5.13.1, 5.14
    • Fix Version/s: None
    • Component/s: Qt Application Manager
    • Labels:
      None
    • Commits:
      df2bd93f00ac4f8f628e5eeecf3527d6e95815a3 (qt/qtapplicationmanager/5.13) 83c08c3965577b58f37a82ee604d2b73ceafcd3a (qt/qtapplicationmanager/5.12)

      Description

      When more than one configuration file is used (and not cached), they are parsed in parallel. The YAML parser's use of regular expressions is not threadsafe or even reentrant, so multiple config files can lead to crashes or possibly incorrectly parsed files.

       

      Numeric literals are parsed with a static array of QRegExp/QRegularExpression shared by all threads. Those could be copied, but the concurrent use of the same instance is not safe. The rewrite in 5.14 switched to using QRegularExpression, which is still incorrect but might work in practice because match() is now const.

       

      I don't see why configuration is parsed in parallel at all – is the parser actually so slow that it needs parallelization and caching?

        Attachments

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

          Activity

            People

            Assignee:
            rgriebl Robert Griebl
            Reporter:
            special John Brooks
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes