You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistency between stack size in main thread and secondary threads on macOS #78445
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-07-13.14:14:06.057>created_at=<Date2018-07-28.16:00:44.920>labels= ['OS-mac', 'interpreter-core', 'type-feature', '3.8']
title='Inconsistency between stack size in main thread and secondary threads on macOS'updated_at=<Date2019-07-13.14:14:06.056>user='https://github.com/ronaldoussoren'
configure.ac sets the stack size for the main thread on macOS to 1000000 (hex), while Python/threading_pthread.h sets the default stack size for other threads to 0x500000. The latter is half of the former.
IMHO both should be the same, as both claim to have been chosen to be just large enough to accommodate the default recursion limit.
I'd prefer to increase the default stack size of secondary threads to match the main thread. I tagged this as a 3.8 thread because there is a (very) small chance that changing the stack size breaks existing programs (although you'd have to create a lot of threads to use a significant amount of memory).
Activity
ronaldoussoren commentedon Jul 28, 2018
configure.ac sets the stack size for the main thread on macOS to 1000000 (hex), while Python/threading_pthread.h sets the default stack size for other threads to 0x500000. The latter is half of the former.
IMHO both should be the same, as both claim to have been chosen to be just large enough to accommodate the default recursion limit.
I'd prefer to increase the default stack size of secondary threads to match the main thread. I tagged this as a 3.8 thread because there is a (very) small chance that changing the stack size breaks existing programs (although you'd have to create a lot of threads to use a significant amount of memory).
This is vaguely related to bpo-33955.
ronaldoussoren commentedon Jul 28, 2018
PS. A pull request will follow shortly.
ronaldoussoren commentedon Jul 13, 2019
This is a duplicate of 18049, which has a more complete patch.