◐ Shell
clean mode source ↗

gh-139231: Fix estimation of available stack size for recursion limit on macOS by rokm · Pull Request #139232 · python/cpython

… limit on macOS

On macOS, use `pthread_get_stackaddr_np()` and `pthread_get_stacksize_np()`
to determine the stack address and size (used by code handling the
recursion limit), rather than falling back to conservative hard-coded
default of 4 MB.

markshannon

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Sep 24, 2025
… limit on macOS (pythonGH-139232)

Use `pthread_get_stackaddr_np()` and `pthread_get_stacksize_np()` to determine the stack address and size.
(cherry picked from commit 7016044)

Co-authored-by: Rok Mandeljc <rok.mandeljc@gmail.com>

@rokm rokm deleted the macos-stack-size-fix branch

September 24, 2025 11:03

zanieb added a commit to astral-sh/python-build-standalone that referenced this pull request

Oct 15, 2025

This was referenced

Oct 15, 2025

encukou pushed a commit to encukou/cpython that referenced this pull request

Nov 17, 2025
… limit on macOS (pythonGH-139232)

Use `pthread_get_stackaddr_np()` and `pthread_get_stacksize_np()` to determine the stack address and size.

hroncok pushed a commit to hroncok/cpython that referenced this pull request

Nov 24, 2025
… limit on macOS (pythonGH-139232)

Use `pthread_get_stackaddr_np()` and `pthread_get_stacksize_np()` to determine the stack address and size.

(cherry picked from commit 7016044)