diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-12-22 22:44:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-02 22:19:07 +0100 |
commit | ad9554a7f2d4b8a2af3efabc7bc69b9a0ae3751d (patch) | |
tree | 1149368cfe4cab321f29149342c2fd8855938609 /src/3rdparty | |
parent | d5d6e0cf9917c36a93668189014f584e533fc1b9 (diff) |
Apply the fix stated in PCRE bug #1423
There is JIT misoptimization found during code refactoring that
affects PCRE 8.34 (the version currently bundled with Qt).
The upstream might not release a specific bugfix release before 8.35,
hence the patch has been manually applied.
Upstream issue: http://bugs.exim.org/show_bug.cgi?id=1423
Change-Id: I8dbbb2981bc037d39b30fcaded6894ee9820b8df
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/pcre/patches/bug_1423_jit_condition_misoptimization_fix.diff | 15 | ||||
-rw-r--r-- | src/3rdparty/pcre/pcre_jit_compile.c | 4 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/3rdparty/pcre/patches/bug_1423_jit_condition_misoptimization_fix.diff b/src/3rdparty/pcre/patches/bug_1423_jit_condition_misoptimization_fix.diff new file mode 100644 index 0000000000..4fd46d57a1 --- /dev/null +++ b/src/3rdparty/pcre/patches/bug_1423_jit_condition_misoptimization_fix.diff @@ -0,0 +1,15 @@ +Index: pcre_jit_compile.c +=================================================================== +--- pcre_jit_compile.c (revision 1413) ++++ pcre_jit_compile.c (working copy) +@@ -3546,7 +3546,9 @@ + } + return TRUE; + } +- if ((ranges[3] - ranges[2]) == (ranges[5] - ranges[4]) && is_powerof2(ranges[4] - ranges[2])) ++ if ((ranges[3] - ranges[2]) == (ranges[5] - ranges[4]) ++ && (ranges[2] | (ranges[4] - ranges[2])) == ranges[4] ++ && is_powerof2(ranges[4] - ranges[2])) + { + if (readch) + read_char(common); diff --git a/src/3rdparty/pcre/pcre_jit_compile.c b/src/3rdparty/pcre/pcre_jit_compile.c index 449e55d4b1..a318708b46 100644 --- a/src/3rdparty/pcre/pcre_jit_compile.c +++ b/src/3rdparty/pcre/pcre_jit_compile.c @@ -3546,7 +3546,9 @@ switch(ranges[0]) } return TRUE; } - if ((ranges[3] - ranges[2]) == (ranges[5] - ranges[4]) && is_powerof2(ranges[4] - ranges[2])) + if ((ranges[3] - ranges[2]) == (ranges[5] - ranges[4]) + && (ranges[2] | (ranges[4] - ranges[2])) == ranges[4] + && is_powerof2(ranges[4] - ranges[2])) { if (readch) read_char(common); |