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,