merge heads

This commit is contained in:
Benjamin Peterson 2012-03-13 16:13:21 -05:00
commit 47930016ff
2 changed files with 15 additions and 8 deletions

View File

@ -22,6 +22,9 @@ Core and Builtins
Library Library
------- -------
- Issue #14184: Increase the default stack size for secondary threads on
Mac OS X to avoid interpreter crashes when using threads on 10.7.
- Issue #10543: Fix unittest test discovery with Jython bytecode files. - Issue #10543: Fix unittest test discovery with Jython bytecode files.
- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under - Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under

View File

@ -19,14 +19,18 @@
#define THREAD_STACK_SIZE 0 /* use default stack size */ #define THREAD_STACK_SIZE 0 /* use default stack size */
#endif #endif
#if (defined(__APPLE__) || defined(__FreeBSD__)) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0 /* The default stack size for new threads on OSX and BSD is small enough that
/* The default stack size for new threads on OSX is small enough that * we'll get hard crashes instead of 'maximum recursion depth exceeded'
* we'll get hard crashes instead of 'maximum recursion depth exceeded' * exceptions.
* exceptions. *
* * The default stack sizes below are the empirically determined minimal stack
* The default stack size below is the minimal stack size where a * sizes where a simple recursive function doesn't cause a hard crash.
* simple recursive function doesn't cause a hard crash. */
*/ #if defined(__APPLE__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0
#undef THREAD_STACK_SIZE
#define THREAD_STACK_SIZE 0x500000
#endif
#if defined(__FreeBSD__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0
#undef THREAD_STACK_SIZE #undef THREAD_STACK_SIZE
#define THREAD_STACK_SIZE 0x400000 #define THREAD_STACK_SIZE 0x400000
#endif #endif