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 2015-10-30.16:12:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On OSX 10.4 or later the following functions are available:

size_t pthread_get_stacksize_np(pthread_t);
void* pthread_get_stackaddr_np(pthread_t);

These functions could be used to implement PyOS_CheckStack on OSX. The advantage of this would be that it would get less likely that recursion causes hard crashes when the recursion limit is not optimally tuned to the stack size on OSX. (Note that OSX has a fixed size stack for the main thread as well, AFAIK unlike linux).

The disadvantage of implementing this is that a naive implementation might have a negative performance impact. It should be possible to avoid this by caching the return values of these functions in the thread state.

Another disadvantage according to a quick search on Google: ``pthread_get_stacksize_np`` appears to be buggy on some OSX versions, which requires workarounds to get the right behavior.
Date User Action Args
2015-10-30 16:12:03ronaldoussorensetrecipients: + ronaldoussoren, ned.deily
2015-10-30 16:12:03ronaldoussorensetmessageid: <>
2015-10-30 16:12:03ronaldoussorenlinkissue25518 messages
2015-10-30 16:12:03ronaldoussorencreate