Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
5.11, 5.12.4, 5.13.1, 5.14
-
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
For Gerrit Dashboard: AUTOSUITE-1410 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
288704,4 | Fix crash in parallel YAML parsing | 5.13 | qt/qtapplicationmanager | Status: MERGED | +2 | 0 |
288792,2 | Fix crash in parallel YAML parsing | 5.12 | qt/qtapplicationmanager | Status: MERGED | +2 | 0 |