summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/pcre/patches
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/pcre/patches')
-rw-r--r--src/3rdparty/pcre/patches/bug_1423_jit_condition_misoptimization_fix.diff15
-rw-r--r--src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch18
2 files changed, 15 insertions, 18 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/patches/r1340_fix_jit_on_android.patch b/src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch
deleted file mode 100644
index 41699d4882..0000000000
--- a/src/3rdparty/pcre/patches/r1340_fix_jit_on_android.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Index: sljit/sljitConfigInternal.h
-===================================================================
---- sljit/sljitConfigInternal.h (revision 1339)
-+++ sljit/sljitConfigInternal.h (working copy)
-@@ -221,6 +221,13 @@
- #define SLJIT_CACHE_FLUSH(from, to) \
- sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
-
-+#elif defined __ANDROID__
-+
-+/* Android lacks __clear_cache; instead, cacheflush should be used. */
-+
-+#define SLJIT_CACHE_FLUSH(from, to) \
-+ cacheflush((long)(from), (long)(to), 0)
-+
- #elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-
- /* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */