pcre/pcre-8.41-fix_stack_estimator.patch
Petr Šabata b6f504e41e RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/pcre#601f55c97942d245a8da7b1446744649bd6f8147
2020-10-15 23:03:08 +02:00

25 lines
798 B
Diff

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>
diff --git a/pcre/pcre_exec.c b/pcre/pcre_exec.c
--- a/pcre/pcre_exec.c
+++ b/pcre/pcre_exec.c
@@ -509,6 +509,12 @@
(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,