File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ Core and Builtins
2424Library
2525-------
2626
27+ - Issue #14184: Increase the default stack size for secondary threads on
28+ Mac OS X to avoid interpreter crashes when using threads on 10.7.
29+
2730- Issue #14180: time.ctime(), gmtime(), time.localtime(),
2831 datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp() and
2932 datetime.datetime.utcfromtimestamp() now raises an OverflowError, instead of
Original file line number Diff line number Diff line change 1919#define THREAD_STACK_SIZE 0 /* use default stack size */
2020#endif
2121
22- #if (defined(__APPLE__ ) || defined(__FreeBSD__ )) && defined(THREAD_STACK_SIZE ) && THREAD_STACK_SIZE == 0
23- /* The default stack size for new threads on OSX is small enough that
24- * we'll get hard crashes instead of 'maximum recursion depth exceeded'
25- * exceptions.
26- *
27- * The default stack size below is the minimal stack size where a
28- * simple recursive function doesn't cause a hard crash.
29- */
22+ /* The default stack size for new threads on OSX and BSD is small enough that
23+ * we'll get hard crashes instead of 'maximum recursion depth exceeded'
24+ * exceptions.
25+ *
26+ * The default stack sizes below are the empirically determined minimal stack
27+ * sizes where a simple recursive function doesn't cause a hard crash.
28+ */
29+ #if defined(__APPLE__ ) && defined(THREAD_STACK_SIZE ) && THREAD_STACK_SIZE == 0
30+ #undef THREAD_STACK_SIZE
31+ #define THREAD_STACK_SIZE 0x500000
32+ #endif
33+ #if defined(__FreeBSD__ ) && defined(THREAD_STACK_SIZE ) && THREAD_STACK_SIZE == 0
3034#undef THREAD_STACK_SIZE
3135#define THREAD_STACK_SIZE 0x400000
3236#endif
You can’t perform that action at this time.
0 commit comments