gh-131624: Fix posix_spawn tests failing on NetBSD with stack limit assertions (GH-131625)

Fix recursive limit assertions on NetBSD for posix_spawn.
This commit is contained in:
Furkan Onder 2025-04-13 11:06:38 +00:00 committed by GitHub
parent 00cf5eacc5
commit c7f6535e4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -437,7 +437,7 @@ _Py_InitializeRecursionLimits(PyThreadState *tstate)
_tstate->c_stack_soft_limit = _tstate->c_stack_hard_limit + PYOS_STACK_MARGIN_BYTES;
#else
uintptr_t here_addr = _Py_get_machine_stack_pointer();
# if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(_AIX)
# if defined(HAVE_PTHREAD_GETATTR_NP) && !defined(_AIX) && !defined(__NetBSD__)
size_t stack_size, guard_size;
void *stack_addr;
pthread_attr_t attr;