Title: bpo-32307: thread: fix stack size on musl platforms. by ericonr · Pull Request #26224 · python/cpython · GitHub
Open Graph Title: bpo-32307: thread: fix stack size on musl platforms. by ericonr · Pull Request #26224 · python/cpython
X Title: bpo-32307: thread: fix stack size on musl platforms. by ericonr · Pull Request #26224 · python/cpython
Description: issue32307: Bad assumption on thread stack size makes python crash with musl libc Python/thread_pthread.h hardcodes "known good" thread stack sizes for several platforms it knows about, and assumes all other platforms will follow glibc's behavior of allocating big enough thread stacks. Instead, we force a default value of 2MB (much bigger than musl's 128kB default) which should be safe on most platforms, and override it for the specific platforms which need even more (or less, as in vxworks's case). This also allows us to remove AIX's special case, since it now matches the default. Instead of hardcoding yet more values here, users should be encouraged to set their own using CFLAGS. Alternatively, they can set THREAD_STACK_SIZE to 0 and use the platform's default. This way, test_threading no longer crashes on musl systems. Since we are here, it is not necessary to check if THREAD_STACK_SIZE is defined in this part of the header, because the first few lines after '#ifdef _POSIX_THREAD_ATTR_STACKSIZE' ensure it's always defined. https://bugs.python.org/issue32307
Open Graph Description: issue32307: Bad assumption on thread stack size makes python crash with musl libc Python/thread_pthread.h hardcodes "known good" thread stack sizes for several platforms it knows about, ...
X Description: issue32307: Bad assumption on thread stack size makes python crash with musl libc Python/thread_pthread.h hardcodes "known good" thread stack sizes for several platforms it knows...
Opengraph URL: https://github.com/python/cpython/pull/26224
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:be4b8a73-41a2-1c27-a6d5-0ddedf466309 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 832A:1A12B5:42506EA:5CFC686:6A4F6DC2 |
| html-safe-nonce | 1a217f9f5ab1465b3386393ccc235bd65e2bcac151b59c72137eb642d290ec4d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzJBOjFBMTJCNTo0MjUwNkVBOjVDRkM2ODY6NkE0RjZEQzIiLCJ2aXNpdG9yX2lkIjoiNDExMzEzMTU5ODA4NTMyMDEzMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b5ddc9629d4e195f956c7070cc5c9da1da1d71d9731fbb5e6ceae2a7e455511d |
| hovercard-subject-tag | pull_request:647168904 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/26224/files |
| twitter:image | https://avatars.githubusercontent.com/u/34201958?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/34201958?s=400&v=4 |
| og:image:alt | issue32307: Bad assumption on thread stack size makes python crash with musl libc Python/thread_pthread.h hardcodes "known good" thread stack sizes for several platforms it knows about, ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width