mingw-pcre/pcre-8.41-fix_stack_estimator.patch
DistroBaker 617607bc20 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/mingw-pcre.git#fa4f2f0ef17623370217832a2f449960d3d3c3a0
2020-12-15 14:18:00 +00:00

35 lines
1.1 KiB
Diff

From 0ad3618f226deee531bcced057afa1b52d5b41f5 Mon Sep 17 00:00:00 2001
From: Sergei Golubchik <vuvova@gmail.com>
Date: Wed, 14 Aug 2019 12:09:30 +0400
Subject: [PATCH] Fix recursion stack estimator
Due to inlining match() by recent GCC, the stack estimator reported 4-bytes
stack consumption.
Author: Sergei Golubchik <vuvova@gmail.com>
<https://bugs.exim.org/show_bug.cgi?id=2173>
---
pcre_exec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pcre_exec.c b/pcre_exec.c
index 3fd58cb..2b4d704 100644
--- a/pcre_exec.c
+++ b/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,
--
2.23.0.rc1