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.
Created on 2015年10月30日 16:12 by ronaldoussoren, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (1) | |||
|---|---|---|---|
| msg253742 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2015年10月30日 16:12 | |
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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:23 | admin | set | github: 69704 |
| 2019年08月31日 18:18:01 | ned.deily | set | status: open -> closed superseder: Implement PyOS_CheckStack on macOS using pthread_get_stack*_np resolution: duplicate stage: test needed -> resolved |
| 2015年10月30日 16:12:03 | ronaldoussoren | create | |