mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
Use smaller recursion limits on amd64 and sparc64 to avoid
stack overflows. Tested on: sledge, panther
This commit is contained in:
parent
5f8ab8f9c8
commit
e7f4671585
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=89577
19
lang/python/files/patch-Modules::_sre.c
Normal file
19
lang/python/files/patch-Modules::_sre.c
Normal file
@ -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
|
19
lang/python23/files/patch-Modules::_sre.c
Normal file
19
lang/python23/files/patch-Modules::_sre.c
Normal file
@ -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
|
19
lang/python24/files/patch-Modules::_sre.c
Normal file
19
lang/python24/files/patch-Modules::_sre.c
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user