Skip to content

[3.15] gh-157549: Use sysconf() for the page size in remote_debug.h (GH-157800) - #157813

Merged
pablogsal merged 1 commit into
python:3.15from
miss-islington:backport-9193375-3.15
Sep 19, 2026
Merged

pablogsal merged 1 commit into
python:3.15from
miss-islington:backport-9193375-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

getpagesize() is not an ISO C or POSIX function. Darwin hides the prototype under -std=c11, so the _remote_debugging build fails with -Werror=implicit-function-declaration. That is the failure in the reported x86_64-apple-darwin → arm64-apple-darwin cross build.

Call sysconf(_SC_PAGESIZE) instead, which is already how resource.getpagesize() works. Fall back to 4096 if sysconf() fails.

--without-remote-debug is unchanged. That flag only disables the target-side attach protocol (Py_REMOTE_DEBUG); it does not exclude the _remote_debugging client module.
(cherry picked from commit 9193375)

Co-authored-by: ノウラ | Flare nouraellm@gmail.com

…ythonGH-157800)

getpagesize() is not an ISO C or POSIX function. Darwin hides the prototype under -std=c11, so the _remote_debugging build fails with -Werror=implicit-function-declaration. That is the failure in the reported x86_64-apple-darwin → arm64-apple-darwin cross build.

Call sysconf(_SC_PAGESIZE) instead, which is already how resource.getpagesize() works. Fall back to 4096 if sysconf() fails.

--without-remote-debug is unchanged. That flag only disables the target-side attach protocol (Py_REMOTE_DEBUG); it does not exclude the _remote_debugging client module.
(cherry picked from commit 9193375)

Co-authored-by: ノウラ | Flare <nouraellm@gmail.com>
@pablogsal
pablogsal enabled auto-merge (squash) September 19, 2026 16:12
@pablogsal
pablogsal merged commit 0c66222 into python:3.15 Sep 19, 2026
56 checks passed
@miss-islington
miss-islington deleted the backport-9193375-3.15 branch September 19, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants