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
Commit ae222a3
Browse filesBrowse the repository at this point in the historyBrowse files
pythongh-159876: Detect the C stack size of non-main threads on musl
hardware_stack_limits() skipped pthread_getattr_np() on any Linux that is
neither glibc nor Android, because musl misreports the main thread's stack
as its own default thread stack size rather than the RLIMIT_STACK sized
real one. musl is accurate for the threads it creates itself, though, so
the blanket exclusion left the interpreter assuming Py_C_STACK_SIZE on
every thread: one created with a smaller stack overflowed before the
recursion guard could fire, crashing instead of raising RecursionError.
Query the stack on every thread except the process main thread, where the
previous estimate is kept.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
0 commit comments