[New-bugs-announce] [issue18049] Re-enable threading test on OSX
report at bugs.python.org
Fri May 24 16:27:46 CEST 2013
New submission from Ronald Oussoren:
I recently notied that test.test_threading.ThreadingExceptionTests.test_recursion_limit is disabled for debug builds.
The attached patch re-enables this test case and fixes the crash be increasing the stack size for new threads.
The disadvantage of the patch is that is increases the default stack size for all new threads on OSX from 5 to 8 megabytes (for threads created by Python) and that could affect program behavior as fewer threads can be created before running out of memory.
The patch could be updated to check for Py_DEBUG and only increase the stack size for --with-pydebug builds (which are the ones using -O0), as those builds need the increased stack size and debug builds already consume more memory that normal builds. That's not 100% reliable though, as users could also build the with CFLAGS set to -O0 without using --with-pydebug.
I haven't found a way to detect the optimization level with clang or gcc using the preprocessor.
nosy: ned.deily, ronaldoussoren
stage: patch review
title: Re-enable threading test on OSX
Added file: http://bugs.python.org/file30359/reenable-threading-test.txt
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce