pcre: add patch fixing stack frame size detection

This commit is contained in:
Robin Gloster 2017-12-24 17:35:53 +01:00
parent b96bf4a891
commit 462076c909
2 changed files with 19 additions and 0 deletions

@ -33,6 +33,9 @@ in stdenv.mkDerivation rec {
buildInputs = optional (hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads;
# https://bugs.exim.org/show_bug.cgi?id=2173
patches = [ ./stacksize-detection.patch ];
doCheck = !(with hostPlatform; isCygwin || isFreeBSD) && hostPlatform == buildPlatform;
# XXX: test failure on Cygwin
# we are running out of stack on both freeBSDs on Hydra

@ -0,0 +1,16 @@
diff --git a/pcre_exec.c b/pcre_exec.c
--- a/pcre_exec.c
+++ b/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,