qt5base-lts/config.tests
Giuseppe D'Angelo 9ca635482d 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>
2016-12-12 15:22:01 +00:00
..
arch PowerPC: Add detection of SPE (found on e500) and VSX 2016-06-19 18:46:26 +00:00
common invert the logic of the c++98 default test 2016-11-07 13:02:06 +00:00
mac/corewlan rewrite library handling in configure 2016-08-18 17:09:52 +00:00
qpa Direct2D QPA config test: Test for presence of IDXGISurface1 2016-11-04 11:22:29 +00:00
unix PCRE2: port QRegularExpression to PCRE2 2016-12-12 15:22:01 +00:00
win Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-01 06:02:55 +01:00
x11 rewrite library handling in configure 2016-08-18 17:09:52 +00:00
.gitignore Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
.qmake.conf make also configure tests not see %LIB% and %INCLUDE% under mingw 2016-10-17 13:44:43 +00:00