[New-bugs-announce] [issue18049] Re-enable threading test on OSX

Ronald Oussoren 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.

----------
assignee: ronaldoussoren
components: Macintosh
files: reenable-threading-test.txt
messages: 189912
nosy: ned.deily, ronaldoussoren
priority: normal
severity: normal
stage: patch review
status: open
title: Re-enable threading test on OSX
type: behavior
Added file: http://bugs.python.org/file30359/reenable-threading-test.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18049>
_______________________________________


More information about the New-bugs-announce mailing list