summaryrefslogtreecommitdiff
path: root/pcre
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-10-22 13:03:41 +0200
committerSergei Golubchik <serg@mariadb.org>2017-10-22 13:03:41 +0200
commit9d2e2d753323a934604d25144b9d1ecaf34b47d8 (patch)
tree051a721f7ea77c2278d09323e36088abe22aa66a /pcre
parentd11af09865299033d5eef64531704f6ab8af5304 (diff)
parent2eb3c5e5420a724945a4cba914df25aa1e3744ce (diff)
downloadmariadb-git-9d2e2d753323a934604d25144b9d1ecaf34b47d8.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'pcre')
-rw-r--r--pcre/CMakeLists.txt6
-rw-r--r--pcre/pcre_exec.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/pcre/CMakeLists.txt b/pcre/CMakeLists.txt
index 30b06a46fef..31d4358f14d 100644
--- a/pcre/CMakeLists.txt
+++ b/pcre/CMakeLists.txt
@@ -128,9 +128,9 @@ SET(PCREGREP_BUFSIZE "20480" CACHE STRING
SET(PCRE_NEWLINE "LF" CACHE STRING
"What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).")
-# MARIADB: Changed the default from OFF to ON as pcre_test.bat on Windows
-# MARIADB: fails complaining about too small stack size on Windows.
-SET(PCRE_NO_RECURSE ON CACHE BOOL
+# Windows has much smaller stack (pcre recursion limit of 112, vs
+# 250-500 on Linuxes)
+SET(PCRE_NO_RECURSE "${WIN32}" CACHE BOOL
"If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.")
SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING
diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c
index 70ac2fea381..fa84d924a4c 100644
--- a/pcre/pcre_exec.c
+++ b/pcre/pcre_exec.c
@@ -509,6 +509,12 @@ Returns: MATCH_MATCH if matched ) these values are >= 0
(e.g. stopped by repeated call or recursion limit)
*/
+#ifdef __GNUC__
+static int
+match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
+ PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
+ unsigned int rdepth) __attribute__((noinline,noclone));
+#endif
static int
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,