Skip to content

[3.15] gh-159320: use pthread_getattr_np for stack limit checks even on musl (GH-161749) - #162819

Merged
encukou merged 2 commits into
python:3.15from
hugovk:backport-235d138-3.15
Nov 30, 2026
Merged

encukou merged 2 commits into
python:3.15from
hugovk:backport-235d138-3.15

Conversation

@hugovk

@hugovk hugovk commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Rewrite the pthread_getattr_np usage to avoid the problem on musl of it reporting the stack limit of the main thread incorrectly. On platforms where pthread_getattr_np underreports the main thread's stack size, use RLIMIT_STACK for the main thread instead.

Add HAVE_UNRELIABLE_PTHREAD_GETATTR_NP to the long, long list of ignored symbols for the Py check.

Authored mainly by: Thomas Wouters
(cherry picked from commit 235d138)

… even on musl (pythonGH-161749)

Rewrite the pthread_getattr_np usage to avoid the problem on musl of it
reporting the stack limit of the main thread incorrectly. On platforms where
pthread_getattr_np underreports the main thread's stack size, use
RLIMIT_STACK for the main thread instead.

Add HAVE_UNRELIABLE_PTHREAD_GETATTR_NP to the long, long list of ignored
symbols for the Py check.

Authored mainly by: Thomas Wouters
(cherry picked from commit 235d138)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Thomas Wouters <thomas@python.org>
@hugovk

hugovk commented Nov 28, 2026

Copy link
Copy Markdown
Member Author

!buildbot Alpine

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @hugovk for commit d8c6b68 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F162819%2Fmerge

The command will test the builders whose names match following regular expression: Alpine

The builders matched are:

  • AMD64 Alpine Linux NoGIL PR
  • AMD64 Alpine Linux PR
@encukou
encukou merged commit c7c92f4 into python:3.15 Nov 30, 2026
57 checks passed
@encukou

encukou commented Nov 30, 2026

Copy link
Copy Markdown
Member

Thank you!

@hugovk
hugovk deleted the backport-235d138-3.15 branch November 30, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants