This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ned.deily, ronaldoussoren
Date 2013-05-24.14:27:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-05-24 14:27:46ronaldoussorensetrecipients: + ronaldoussoren, ned.deily
2013-05-24 14:27:46ronaldoussorensetmessageid: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za>
2013-05-24 14:27:46ronaldoussorenlinkissue18049 messages
2013-05-24 14:27:45ronaldoussorencreate