From f6403fa93cedaa1e70fb9befa3a33cd00bfc4126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 9 Oct 2017 16:25:35 +0200 Subject: [PATCH] Add pcre-8.41-fix_stack_estimator.patch --- pcre-8.41-fix_stack_estimator.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pcre-8.41-fix_stack_estimator.patch diff --git a/pcre-8.41-fix_stack_estimator.patch b/pcre-8.41-fix_stack_estimator.patch new file mode 100644 index 0000000..cf388bf --- /dev/null +++ b/pcre-8.41-fix_stack_estimator.patch @@ -0,0 +1,24 @@ +Fix recursion stack estimator + +Due to inlining match() by recent GCC, the stack estimator reported 4-bytes +stack consumption. + +Author: Sergei Golubchik + + +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,