File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Misc/NEWS.d/next/Core_and_Builtins Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change
1
+ Disable computed stack limit checks on non-glibc linux platforms to fix
2
+ crashes on deep recursion.
Original file line number Diff line number Diff line change @@ -439,7 +439,11 @@ _Py_InitializeRecursionLimits(PyThreadState *tstate)
439
439
_tstate -> c_stack_soft_limit = _tstate -> c_stack_hard_limit + _PyOS_STACK_MARGIN_BYTES ;
440
440
#else
441
441
uintptr_t here_addr = _Py_get_machine_stack_pointer ();
442
- # if defined(HAVE_PTHREAD_GETATTR_NP ) && !defined(_AIX ) && !defined(__NetBSD__ )
442
+ /// XXX musl supports HAVE_PTHRED_GETATTR_NP, but the resulting stack size
443
+ /// (on alpine at least) is much smaller than expected and imposes undue limits
444
+ /// compared to the old stack size estimation. (We assume musl is not glibc.)
445
+ # if defined(HAVE_PTHREAD_GETATTR_NP ) && !defined(_AIX ) && \
446
+ !defined(__NetBSD__ ) && (defined(__GLIBC__ ) || !defined(__linux__ ))
443
447
size_t stack_size , guard_size ;
444
448
void * stack_addr ;
445
449
pthread_attr_t attr ;
You can’t perform that action at this time.
0 commit comments