3992d1b
From 0ad3618f226deee531bcced057afa1b52d5b41f5 Mon Sep 17 00:00:00 2001
3992d1b
From: Sergei Golubchik <vuvova@gmail.com>
3992d1b
Date: Wed, 14 Aug 2019 12:09:30 +0400
3992d1b
Subject: [PATCH] Fix recursion stack estimator
3992d1b
3992d1b
Due to inlining match() by recent GCC, the stack estimator reported 4-bytes
3992d1b
stack consumption.
3992d1b
3992d1b
Author: Sergei Golubchik <vuvova@gmail.com>
3992d1b
<https://bugs.exim.org/show_bug.cgi?id=2173>
3992d1b
---
3992d1b
 pcre_exec.c | 6 ++++++
3992d1b
 1 file changed, 6 insertions(+)
3992d1b
3992d1b
diff --git a/pcre_exec.c b/pcre_exec.c
3992d1b
index 3fd58cb..2b4d704 100644
3992d1b
--- a/pcre_exec.c
3992d1b
+++ b/pcre_exec.c
3992d1b
@@ -509,6 +509,12 @@ Returns:       MATCH_MATCH if matched            )  these values are >= 0
3992d1b
                  (e.g. stopped by repeated call or recursion limit)
3992d1b
 */
3992d1b
 
3992d1b
+#ifdef __GNUC__
3992d1b
+static int
3992d1b
+match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
3992d1b
+  PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
3992d1b
+  unsigned int rdepth) __attribute__((noinline,noclone));
3992d1b
+#endif
3992d1b
 static int
3992d1b
 match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
3992d1b
   PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
3992d1b
-- 
3992d1b
2.23.0.rc1
3992d1b