diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-03-13 21:13:21 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-03-13 21:13:21 (GMT) |
commit | 47930016ff2bf57134d4976ae75b00b8e2dad01d (patch) | |
tree | 075677409afd5316aa977ecb6e654c26e2cc6aec | |
parent | 2354a7593f0e006c60d2080dca40579461549cb9 (diff) | |
parent | 7ca97d5208e37690f43045d5f89098f42d88fd0f (diff) | |
download | cpython-47930016ff2bf57134d4976ae75b00b8e2dad01d.zip cpython-47930016ff2bf57134d4976ae75b00b8e2dad01d.tar.gz cpython-47930016ff2bf57134d4976ae75b00b8e2dad01d.tar.bz2 |
merge heads
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Python/thread_pthread.h | 20 |
2 files changed, 15 insertions, 8 deletions
@@ -22,6 +22,9 @@ Core and Builtins 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 #14252: Fix subprocess.Popen.terminate() to not raise an error under diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 3efccf6..3cde035 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -19,14 +19,18 @@ #define THREAD_STACK_SIZE 0 /* use default stack size */ #endif -#if (defined(__APPLE__) || defined(__FreeBSD__)) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0 - /* The default stack size for new threads on OSX is small enough that - * we'll get hard crashes instead of 'maximum recursion depth exceeded' - * exceptions. - * - * The default stack size below is the minimal stack size where a - * simple recursive function doesn't cause a hard crash. - */ +/* The default stack size for new threads on OSX and BSD is small enough that + * we'll get hard crashes instead of 'maximum recursion depth exceeded' + * exceptions. + * + * The default stack sizes below are the empirically determined minimal stack + * sizes where a 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 #define THREAD_STACK_SIZE 0x400000 #endif |