diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2016-01-03 14:38:58 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2016-12-12 15:22:01 +0000 |
commit | 9ca635482d649c59e312e6f1cd73df6685d280b0 (patch) | |
tree | 56ef7631ed10ee497136b889740f569b37974ef4 /config_help.txt | |
parent | 3ce6b1e578cbc78e428ca621930a016e8f61ac9b (diff) | |
download | qtbase-9ca635482d649c59e312e6f1cd73df6685d280b0.tar.gz |
PCRE2: port QRegularExpression to PCRE2
PCRE1 is going towards EOL. PCRE2 is the way forward in terms
of new features, performance, and security improvements. The
APIs that QRegularExpression uses are similar so the required
modifications aren't extensive.
The biggest difference comes to JIT-compiling of the pattern.
In PCRE1, JIT-compiling did not modify the processed PCRE pattern,
but returned a new chunk of data.
This allowed multiple threads to keep matching using the same
processed data and NULL for the JIT data, until a thread
JIT-compiled and atomically set the shared JIT data to the results
of the compilation.
In PCRE2, JIT-compiling _modifies_ the processed PCRE pattern in a
way that it's thread unsafe [1]; the results of JIT-compilation
are stored somewhere inside the processed pattern.
This means the above approach cannot work -- a thread may be
matching while another one JIT-compiles, causing a data race.
While waiting for better workarounds from upstream, employ a
read/write mutex to protect the matching from JIT-compilation.
[1] https://lists.exim.org/lurker/message/20160104.105831.3cb25b39.en.html
[ChangeLog][General] QRegularExpression now requires the PCRE2
library, at least version 10.20. Support for the PCRE1 library
has been dropped. A copy of PCRE2 is shipped with Qt and will
automatically be used on those platforms which lack it.
Change-Id: I9fe11104230a096796df2d0bdcea861acf769f57
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'config_help.txt')
-rw-r--r-- | config_help.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config_help.txt b/config_help.txt index 5725e9213f..fb4606c8cf 100644 --- a/config_help.txt +++ b/config_help.txt @@ -202,8 +202,8 @@ Core options: -inotify ............. Enable inotify support -iconv ............... Enable iconv(3) support [posix/sun/gnu/no] (Unix only) -icu ................. Enable ICU support [auto] + -pcre2 ............... Select used libpcre2 [system/qt] -pps ................. Enable PPS support [auto] (QNX only) - -pcre ................ Select used libpcre3 [system/qt] -zlib ................ Select used zlib [system/qt] ZLIB_LIBS= |