Currently, Python calls pthread_getattr_np() which is... "not portable", as said in the name :-) FreeBSD has a similar function: pthread_attr_get_np() from <pthread_np.h>. I propose using this function to get the stack size on FreeBSD.
Note: I created this issue to solve #159535 regression on FreeBSD.
gh-159603: Use pthread_attr_get_np() on FreeBSD (#159604)
gh-159603: Call pthread_attr_init() in hardware_stack_limits() (#159857)
[3.15] gh-159603: Use pthread_attr_get_np() on FreeBSD (#159604) (#15…
Activity
vstinner commented on Oct 19, 2026
Note: I created this issue to solve #159535 regression on FreeBSD.
gh-159603: Use pthread_attr_get_np() on FreeBSD (#159604)
gh-159603: Call pthread_attr_init() in hardware_stack_limits() (#159857)
[3.15] gh-159603: Use pthread_attr_get_np() on FreeBSD (#159604) (#15…