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

Crash in parallel config file parsing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.11, 5.12.4, 5.13.1, 5.14
    • Qt Application Manager
    • None
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: