From 49e75c798819f83efcde5a8903186eebf9a3625b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 20 Oct 2003 20:59:45 +0000 Subject: Patch #813391: Reduce limits for amd64 and sparc64. --- Modules/_sre.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Modules/_sre.c b/Modules/_sre.c index a8a9774..d918e77 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -71,9 +71,14 @@ static char copyright[] = Win64 (MS_WIN64), Linux64 (__LP64__), Monterey (64-bit AIX) (_LP64) */ /* FIXME: maybe the limit should be 40000 / sizeof(void*) ? */ #define USE_RECURSION_LIMIT 7500 -#else -#if defined(__GNUC__) && defined(WITH_THREAD) && defined(__FreeBSD__) +#elif defined(__FreeBSD__) +/* FreeBSD/amd64 and /sparc64 require even smaller limits */ +#if defined(__amd64__) +#define USE_RECURSION_LIMIT 6000 +#elif defined(__sparc64__) +#define USE_RECURSION_LIMIT 3000 +#elif defined(__GNUC__) && defined(WITH_THREAD) /* the pthreads library on FreeBSD has a fixed 1MB stack size for the * initial (or "primary") thread, which is insufficient for the default * recursion limit. gcc 3.x at the default optimisation -- cgit v0.12