[Python-Dev] [Python-checkins] cpython (3.3): backported rev 79713 from 3.4, test_recursion_limit skipped for -O0
Ronald Oussoren
ronaldoussoren at mac.com
Wed Apr 24 08:44:38 CEST 2013
On 24 Apr, 2013, at 8:14, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
>
> On 24 Apr, 2013, at 1:32, "lukasz.langa" <python-checkins at python.org> wrote:
>
>> http://hg.python.org/cpython/rev/9755036c81d0
>> changeset: 83510:9755036c81d0
>> branch: 3.3
>> parent: 83508:44d764238f0d
>> user: Łukasz Langa <lukasz at langa.pl>
>> date: Wed Apr 24 01:29:26 2013 +0200
>> summary:
>> backported rev 79713 from 3.4, test_recursion_limit skipped for -O0
>>
>> files:
>> Lib/test/test_threading.py | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>>
>> diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
>> --- a/Lib/test/test_threading.py
>> +++ b/Lib/test/test_threading.py
>> @@ -754,7 +754,8 @@
>> lock = threading.Lock()
>> self.assertRaises(RuntimeError, lock.release)
>>
>> - @unittest.skipUnless(sys.platform == 'darwin', 'test macosx problem')
>> + @unittest.skipUnless(sys.platform == 'darwin' and test.support.python_is_optimized(),
>> + 'test macosx problem')
>
> Wouldn't it be better to just fix the issue? thread_pthread already sets an explicit stack size on OSX, but that value is appearently too small.
In particular, this patch appears to fix the crash that's the reason for disabling the test:
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -28,7 +28,7 @@
*/
#if defined(__APPLE__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0
#undef THREAD_STACK_SIZE
-#define THREAD_STACK_SIZE 0x500000
+#define THREAD_STACK_SIZE 0x550000
#endif
#if defined(__FreeBSD__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0
#undef THREAD_STACK_SIZE
Without this patch test_recursion_limit fails due to a crash, with the patch the test passes (debug build, x86_64, OSX 10.8.3).
Ronald
More information about the Python-Dev
mailing list