aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python24
diff options
context:
space:
mode:
authorperky <perky@FreeBSD.org>2003-09-28 02:29:04 +0800
committerperky <perky@FreeBSD.org>2003-09-28 02:29:04 +0800
commit5a542d8f20c81797ac7dac0cef50c2348f2d7497 (patch)
tree06fc72f7691ae5bbbd1ea989dd3fb96a9c8c7fab /lang/python24
parent2421bcf27543295c99aee3a1e2ee6d8d45984bfe (diff)
downloadfreebsd-ports-gnome-5a542d8f20c81797ac7dac0cef50c2348f2d7497.tar.gz
freebsd-ports-gnome-5a542d8f20c81797ac7dac0cef50c2348f2d7497.tar.zst
freebsd-ports-gnome-5a542d8f20c81797ac7dac0cef50c2348f2d7497.zip
Use smaller recursion limits on amd64 and sparc64 to avoid
stack overflows. Tested on: sledge, panther
Diffstat (limited to 'lang/python24')
-rw-r--r--lang/python24/files/patch-Modules::_sre.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lang/python24/files/patch-Modules::_sre.c b/lang/python24/files/patch-Modules::_sre.c
new file mode 100644
index 000000000000..e316a144e075
--- /dev/null
+++ b/lang/python24/files/patch-Modules::_sre.c
@@ -0,0 +1,19 @@
+--- Modules/_sre.c 26 Jun 2003 14:41:08 -0000 2.99
++++ Modules/_sre.c 27 Sep 2003 18:13:15 -0000
+@@ -71,9 +71,14 @@
+ 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 requires even smaller limit */
++#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